From weigelt at metux.de Tue May 1 10:58:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 19:58:50 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <20070501175850.GB26224@nibiru.local> * Jorge Torres schrieb: Hi, > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that > may differ a lot from what vtiger golas might be, therefore I want > to start a new project at sourceforge.net based on vtigerCRM 5. Of course you're free to do your own fork, but I'd like to invite you to contribute to the upstream. If you're moving too far from the upstream, we cannot benefit from each other's work anymore. BTW: I'm currently working on my own branch for really porting it to postgresql. There're lots of things to clean up here. Once this is is done (and hopefully went to the upstream), I'm going to some works on making it easier to use (ie. switch off unused features). Maybe you'd like to join me ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Tue May 1 12:48:36 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 1 May 2007 14:48:36 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501175850.GB26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> Message-ID: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Enrico, Sure count me in, Can you send me some of your todo list, so I can check what I'm capable of helping with? That minimized branch you mentioned, would it still support MySQL? At this moment, I'm working on changing the pop-up windows, for WebWM windows, anyhow I will prepare a todo list I have in mind, so you get to see where we can join forces. Thank you, Jorge On 5/1/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Of course you're free to do your own fork, but I'd like to invite > you to contribute to the upstream. If you're moving too far from the > upstream, we cannot benefit from each other's work anymore. > > BTW: I'm currently working on my own branch for really porting it to > postgresql. There're lots of things to clean up here. Once this is > is done (and hopefully went to the upstream), I'm going to some > works on making it easier to use (ie. switch off unused features). > > Maybe you'd like to join me ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070501/689d85dc/attachment.htm From weigelt at metux.de Tue May 1 13:05:52 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 22:05:52 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Message-ID: <20070501200552.GC26224@nibiru.local> * Jorge Torres schrieb: Hi, > Can you send me some of your todo list, so I can check what > I'm capable of helping with? The most important, for now, is to replace all the $adb->query_result() calls, since a) it does not work with postgresql (adodb brokenness) and b) it's an huge resource waster. > That minimized branch you mentioned, would it still support MySQL? Yep. I don't intend to drop it. > At this moment, I'm working on changing the pop-up windows, for WebWM > windows, anyhow I will prepare a todo list I have in mind, so you get to see > where we can join forces. Ok. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From dome at tel.co.th Tue May 1 18:06:13 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 08:06:13 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> What's status of your poetgresql branch ? Can i test ? Dome C. On 5/2/07, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From gopals at vtiger.com Tue May 1 21:19:25 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 02 May 2007 09:49:25 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <4638114D.5010303@vtiger.com> Hi Jorge, Thanks for your interest in vtiger CRM project. Please see my response below (in blue color) Jorge Torres wrote: > Hi everyone, > > First I want to tell you developers that I admire your work. I first > downloaded vtiger a few days ago, for customer relationship management > at my uncles little ceramic factory, and I was amazed, but after I > showed it to him, well, it seems that it is too much for what my uncle > wants. * Gopal:* From the Security settings module, you can disable modules/fields that are not required. Please get back to me if you need any further clarifications. > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that may > differ a lot from what vtiger golas might be, therefore I want to > start a new project at sourceforge.net based > on vtigerCRM 5. * Gopal:* Down the road, we are planning to make vtiger CRM - fully customizable so that business users configure the vtiger system instead of hacking the code. Could you please post your goals, so that we will cross-check our road map and let you know our position? > I don't understand to much about Open Source Licencing restrictions > and related stuff, so please excuse my ignorance. My question are: * Gopal:* vtiger CRM code base contains our _*own contributions*_ and many third-party packages. Our own contributions are released under _vtiger Public License (based on Mozilla Public License)_. Please refer to the following URL for details about licenses of third-party packages: http://wiki.vtiger.com/index.php/Third_Party_Software > > Can I start a new project at sourceforge based on vtiger? * Gopal:* In general there are no issues in forking open source projects, provided you are not violating the Open Source license of your predecessor. > If so, Would I have to cover it under some other new license type? *Gopal:* Release your contributions under some Open Source license which meets your requirements. > Do I need some permit from vtiger team to start such project? * Gopal:* _vtiger CRM code base_ is 100% open source by spirit. Hence you may not require special permission from our side. > I know about removing logos because of trademarks, what else do I have > to remove? * > * * Gopal:* Kindly review the vtiger and other third-party licenses with your Legal adviser (council) before modifying back-end/front-end code base. On a separate note, our community is actively participating in vtiger development. Most of the community members (developers/testers/writers/translators) are directly contributing to the core code base (For example: PostgreSQL & DMS branches in our SVN). http://vtiger.fosslabs.com We are also encouraging many add-on projects based on vtiger CRM, which cater to the need of user-specific requirements. For more details, please refer to our vtigerForge: http://vtigerforge.com Best wishes, Gopal (vtiger - Team Member) > > Well that's it for now, I will continue on my "trying to understand > vtiger's code" task, so I will probably have some questions related to > developing in short. > > Thank you very much, > > > Jorge > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/48cab81f/attachment.html From jens at Strawberry.COM Tue May 1 23:20:57 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:20:57 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local>; from Enrico Weigelt on Tue, May 01, 2007 at 10:05:52PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <20070502082057.D16394@Strawberry.COM> Hi, I already did a port to postgresql and have contributed my patches to Don and Ritchie so far. I do not agree that the $adb->query_results are broken as I'm running on postgresql since 5.0rc1 ... Jens On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Tue May 1 23:21:30 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:21:30 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:06:13AM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502082130.E16394@Strawberry.COM> You may use the 5.1_jens branch which is working. Jens On Wed, May 02, 2007 at 08:06:13AM +0700, Dome Charoenyost wrote: > What's status of your poetgresql branch ? > > Can i test ? > > Dome C. > > > On 5/2/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 2 03:35:59 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 12:35:59 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638114D.5010303@vtiger.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> Message-ID: <1178102159.31989.24.camel@joesunix.int> Hi, I read this thread and I just keep asking myself: what am I doing wrong? You guys have branches and are participating. I have been asking to help for a long time now and I am just being ignored. I really would like to help and work together. Joe TSolucio El mi?, 02-05-2007 a las 09:49 +0530, Gopal escribi?: > Hi Jorge, > > Thanks for your interest in vtiger CRM project. > > Please see my response below (in blue color) > > Jorge Torres wrote: > > Hi everyone, > > > > First I want to tell you developers that I admire your work. I first > > downloaded vtiger a few days ago, for customer relationship > > management at my uncles little ceramic factory, and I was amazed, > > but after I showed it to him, well, it seems that it is too much for > > what my uncle wants. > > Gopal: From the Security settings module, you can disable > modules/fields that are not required. Please get back to me if you > need any further clarifications. > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Gopal: Down the road, we are planning to make vtiger CRM - fully > customizable so that business users configure the vtiger system > instead of hacking the code. Could you please post your goals, so > that we will cross-check our road map and let you know our position? > > I don't understand to much about Open Source Licencing restrictions > > and related stuff, so please excuse my ignorance. My question are: > > Gopal: vtiger CRM code base contains our own contributions and many > third-party packages. Our own contributions are released under vtiger > Public License (based on Mozilla Public License). Please refer to the > following URL for details about licenses of third-party packages: > > http://wiki.vtiger.com/index.php/Third_Party_Software > > > > Can I start a new project at sourceforge based on vtiger? > > Gopal: In general there are no issues in forking open source projects, > provided you are not violating the Open Source license of your > predecessor. > > If so, Would I have to cover it under some other new license type? > Gopal: Release your contributions under some Open Source license which > meets your requirements. > > Do I need some permit from vtiger team to start such project? > > Gopal: vtiger CRM code base is 100% open source by spirit. Hence you > may not require special permission from our side. > > I know about removing logos because of trademarks, what else do I > > have to remove? > > Gopal: Kindly review the vtiger and other third-party licenses with > your Legal adviser (council) before modifying back-end/front-end code > base. > > On a separate note, our community is actively participating in vtiger > development. Most of the community members > (developers/testers/writers/translators) are directly contributing to > the core code base (For example: PostgreSQL & DMS branches in our > SVN). > > http://vtiger.fosslabs.com > > We are also encouraging many add-on projects based on vtiger CRM, > which cater to the need of user-specific requirements. For more > details, please refer to our vtigerForge: > > http://vtigerforge.com > > Best wishes, > Gopal > (vtiger - Team Member) > > > > Well that's it for now, I will continue on my "trying to understand > > vtiger's code" task, so I will probably have some questions related > > to developing in short. > > > > Thank you very much, > > > > > > Jorge > > > > ____________________________________________________________________ > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Wed May 2 03:56:24 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 12:56:24 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502105624.GA5311@nibiru.local> * Dome Charoenyost schrieb: > What's status of your poetgresql branch ? Work is still in progress. > Can i test ? I'll try to get some patches ready today. Or should I upload to SVN (need some short howto, I'm not really expierenced w/ svn) ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 2 04:13:36 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 13:13:36 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <20070502111336.GB5311@nibiru.local> * Jens Hamisch schrieb: Hi, > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... well, I can only speak for the latest release and my trunk checkout of last week. a) several things in schema create needed to be fixed b) schema update (ie. ALTER TABLE ...) was totally broken c) the adodb Move() method was completely missing in the postgres driver And the $adb->query_results() thing: Well, it's and really bad idea (even if pgsql->Move() would work). Too much complexity in- and outside, too long codepathes, too inefficient. I've introduced some new query functions: * $adb->run_query_allrecords($query) -> returns the result in an array/list records (associative arrays) * $adb->run_query_record($query) -> returns only the first record. * $adb->run_query_field($query,$field) -> returns given field from the first record * $adb->run_query_list($query,$field) -> returns an list of the values from given field. Now I'm in the process of rewriting the calls to query_result() to an appropriate of the new functions. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 2 06:24:47 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 15:24:47 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502111336.GB5311@nibiru.local>; from Enrico Weigelt on Wed, May 02, 2007 at 01:13:36PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> Message-ID: <20070502152447.A6085@Strawberry.COM> Hi, please have a look at the 5.1_jens branch at first! This is a 5.0.3 release sucessfully running on postgresql. This version is stable. The database fixes were introduced in an early 5.0 prerelease. I'm running vtiger on postgres since then. Part of the patches were already implemented in 5.0GA. The rest was posted to Richie/Don about 3 weeks ago. JenS On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > I already did a port to postgresql and have contributed my patches to > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > broken as I'm running on postgresql since 5.0rc1 ... > > well, I can only speak for the latest release and my trunk checkout > of last week. > > a) several things in schema create needed to be fixed > b) schema update (ie. ALTER TABLE ...) was totally broken > c) the adodb Move() method was completely missing in the postgres driver > > And the $adb->query_results() thing: > Well, it's and really bad idea (even if pgsql->Move() would work). > Too much complexity in- and outside, too long codepathes, too inefficient. > > I've introduced some new query functions: > > * $adb->run_query_allrecords($query) > -> returns the result in an array/list records (associative arrays) > > * $adb->run_query_record($query) > -> returns only the first record. > > * $adb->run_query_field($query,$field) > -> returns given field from the first record > > * $adb->run_query_list($query,$field) > -> returns an list of the values from given field. > > Now I'm in the process of rewriting the calls to query_result() > to an appropriate of the new functions. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 06:45:38 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:45:38 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502152447.A6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> Message-ID: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> i still found error on 5.1_jens Fatal error: Call to a member function on a non-object in /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 postgresql 8.1 php4.4 Debian etch Dome C. On 5/2/07, Jens Hamisch wrote: > > Hi, > > please have a look at the 5.1_jens branch at first! This is > a 5.0.3 release sucessfully running on postgresql. > This version is stable. The database fixes were introduced in > an early 5.0 prerelease. I'm running vtiger on postgres since > then. > > Part of the patches were already implemented in 5.0GA. The rest > was posted to Richie/Don about 3 weeks ago. > > JenS > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > * Jens Hamisch schrieb: > > > > Hi, > > > > > I already did a port to postgresql and have contributed my patches to > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > well, I can only speak for the latest release and my trunk checkout > > of last week. > > > > a) several things in schema create needed to be fixed > > b) schema update (ie. ALTER TABLE ...) was totally broken > > c) the adodb Move() method was completely missing in the postgres driver > > > > And the $adb->query_results() thing: > > Well, it's and really bad idea (even if pgsql->Move() would work). > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > I've introduced some new query functions: > > > > * $adb->run_query_allrecords($query) > > -> returns the result in an array/list records (associative arrays) > > > > * $adb->run_query_record($query) > > -> returns only the first record. > > > > * $adb->run_query_field($query,$field) > > -> returns given field from the first record > > > > * $adb->run_query_list($query,$field) > > -> returns an list of the values from given field. > > > > Now I'm in the process of rewriting the calls to query_result() > > to an appropriate of the new functions. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From dome at tel.co.th Wed May 2 06:46:16 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:46:16 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502105624.GA5311@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> <20070502105624.GA5311@nibiru.local> Message-ID: <8ccbff060705020646h4c848925k30338b574e6c2d60@mail.gmail.com> Please send me patch Thanks. Dome C. On 5/2/07, Enrico Weigelt wrote: > * Dome Charoenyost schrieb: > > What's status of your poetgresql branch ? > > Work is still in progress. > > > Can i test ? > > I'll try to get some patches ready today. > > Or should I upload to SVN (need some short howto, I'm not > really expierenced w/ svn) ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 07:37:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 16:37:37 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:45:38PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> Message-ID: <20070502163737.B6085@Strawberry.COM> Hi, I'm running php 5.1.4. According to the installation manual, 5.0.x thru 5.2.x is supported only. Jens On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > i still found error on 5.1_jens > Fatal error: Call to a member function on a non-object in > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > postgresql 8.1 > php4.4 > > Debian etch > > Dome C. > > > > On 5/2/07, Jens Hamisch wrote: > > > > Hi, > > > > please have a look at the 5.1_jens branch at first! This is > > a 5.0.3 release sucessfully running on postgresql. > > This version is stable. The database fixes were introduced in > > an early 5.0 prerelease. I'm running vtiger on postgres since > > then. > > > > Part of the patches were already implemented in 5.0GA. The rest > > was posted to Richie/Don about 3 weeks ago. > > > > JenS > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > * Jens Hamisch schrieb: > > > > > > Hi, > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > well, I can only speak for the latest release and my trunk checkout > > > of last week. > > > > > > a) several things in schema create needed to be fixed > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > And the $adb->query_results() thing: > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > I've introduced some new query functions: > > > > > > * $adb->run_query_allrecords($query) > > > -> returns the result in an array/list records (associative arrays) > > > > > > * $adb->run_query_record($query) > > > -> returns only the first record. > > > > > > * $adb->run_query_field($query,$field) > > > -> returns given field from the first record > > > > > > * $adb->run_query_list($query,$field) > > > -> returns an list of the values from given field. > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > to an appropriate of the new functions. > > > > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 08:22:52 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 22:22:52 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502163737.B6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> Message-ID: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> I'm test on php 5.2 found object to string error ( in log->debug) when create new contact Call to a member function Move() on a non-object in /var/www/crmpgsql/include/database/PearDatabase.php on line 441 Dome C. On 5/2/07, Jens Hamisch wrote: > Hi, > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > 5.2.x is supported only. > > Jens > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > i still found error on 5.1_jens > > Fatal error: Call to a member function on a non-object in > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > postgresql 8.1 > > php4.4 > > > > Debian etch > > > > Dome C. > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > Hi, > > > > > > please have a look at the 5.1_jens branch at first! This is > > > a 5.0.3 release sucessfully running on postgresql. > > > This version is stable. The database fixes were introduced in > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > then. > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > was posted to Richie/Don about 3 weeks ago. > > > > > > JenS > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > * Jens Hamisch schrieb: > > > > > > > > Hi, > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > of last week. > > > > > > > > a) several things in schema create needed to be fixed > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > And the $adb->query_results() thing: > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > I've introduced some new query functions: > > > > > > > > * $adb->run_query_allrecords($query) > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > * $adb->run_query_record($query) > > > > -> returns only the first record. > > > > > > > > * $adb->run_query_field($query,$field) > > > > -> returns given field from the first record > > > > > > > > * $adb->run_query_list($query,$field) > > > > -> returns an list of the values from given field. > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > to an appropriate of the new functions. > > > > > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 09:00:05 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 18:00:05 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 10:22:52PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> Message-ID: <20070502180005.A6711@Strawberry.COM> Hi Richie, didn't Mr. Priebsch tell us something about name space modifications between php 5.1.x and 5.2.0? In fact the version running at my side (php 5.1.4) seems run into problems on 5.2.0 ... Jens On Wed, May 02, 2007 at 10:22:52PM +0700, Dome Charoenyost wrote: > I'm test on php 5.2 found object to string error ( in log->debug) > > when create new contact > Call to a member function Move() on a non-object in > /var/www/crmpgsql/include/database/PearDatabase.php on line 441 > > Dome C. > > On 5/2/07, Jens Hamisch wrote: > > Hi, > > > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > > 5.2.x is supported only. > > > > Jens > > > > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > > i still found error on 5.1_jens > > > Fatal error: Call to a member function on a non-object in > > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > > > postgresql 8.1 > > > php4.4 > > > > > > Debian etch > > > > > > Dome C. > > > > > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > > > Hi, > > > > > > > > please have a look at the 5.1_jens branch at first! This is > > > > a 5.0.3 release sucessfully running on postgresql. > > > > This version is stable. The database fixes were introduced in > > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > > then. > > > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > > was posted to Richie/Don about 3 weeks ago. > > > > > > > > JenS > > > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > > * Jens Hamisch schrieb: > > > > > > > > > > Hi, > > > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > > of last week. > > > > > > > > > > a) several things in schema create needed to be fixed > > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > > > And the $adb->query_results() thing: > > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > > > I've introduced some new query functions: > > > > > > > > > > * $adb->run_query_allrecords($query) > > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > > > * $adb->run_query_record($query) > > > > > -> returns only the first record. > > > > > > > > > > * $adb->run_query_field($query,$field) > > > > > -> returns given field from the first record > > > > > > > > > > * $adb->run_query_list($query,$field) > > > > > -> returns an list of the values from given field. > > > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > > to an appropriate of the new functions. > > > > > > > > > > > > > > > cu > > > > > -- > > > > > --------------------------------------------------------------------- > > > > > Enrico Weigelt == metux IT service > > > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > > fax: +49 36207 519932 email: contact at metux.de > > > > > cellphone: +49 174 7066481 > > > > > --------------------------------------------------------------------- > > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > > --------------------------------------------------------------------- > > > > > _______________________________________________ > > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > > -- > > > > > > > > -------------------------------------------------------------------------------- > > > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > > SSSSS-----SSSSS > > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > > SSSSSSSSS Jens Hamisch > > > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 2 09:31:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 18:31:09 +0200 Subject: [Vtigercrm-developers] insert data function Message-ID: <20070502163109.GA19391@nibiru.local> Hi folks, JFYI: I've added an new function run_insert_data($table,$data) to the PearDatabase lass ($adb). It handles the cases where simply one record is inserted to some table. The sql query is built from an associative array (in fact this is done by sql_insert_data()), executed and if an error is detected, an error is thrown. I'm going to submit an patch this afternoon. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 2 12:13:25 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:13:25 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Hi, Since it is now clear that postgres is supported, the only thing would be about Enrico's opinion of adb->query_results being resource wasting, which is very important regardless of mysql or postgres use, Enrico, what are you doing instead of using the query_results method? About the other thing here is a todo list which could possibly be common with vtiger's: - Use WebWM (webwm.sourceforge.net), instead of porpup windows which are blocked by internet explorer and sometimes firefox, also use WebWM for virtual windows, such as the ones in editing custom fields. - I don't know why imap email doest work, I get the message that email should be configured, even if it is in fact configured, well so i will try to fix that, + adding imap options to the Add user template, - DHTML Customizable pdf sheet creator for sales-orders and the others, - AJAX calendar refresh, and adding standard calendar view on a floating window. - Date field DHTML floating box. - Help DHTML widgets, which will soon be offered by the webwm framework. - Translation facility, probably a script that reads every lang file, and organizes it in a HTML form, and then form it regenerate the lang files, so language translation can be made from web, rather that getting into the code, + the fact of making it a lot more easier when adding new definitions and translating them to the other files. Well with that I think I have lot to play with for some time. Thank you, Jorge On 5/2/07, Jens Hamisch wrote: > > > Hi, > > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... > > Jens > > > On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get > to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/1c28fc7c/attachment.html From joe at tsolucio.com Wed May 2 12:37:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 21:37:14 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <4638E86A.70707@tsolucio.com> Hi Jorge, Jorge Torres escribi?: > Hi, > > Since it is now clear that postgres is supported, the only thing would > be about Enrico's opinion of adb->query_results being resource > wasting, which is very important regardless of mysql or postgres use, > Enrico, what are you doing instead of using the query_results method? > > About the other thing here is a todo list which could possibly be > common with vtiger's: > > - Use WebWM (webwm.sourceforge.net ), > instead of porpup windows which are blocked by internet explorer and > sometimes firefox, also use WebWM for virtual windows, such as the > ones in editing custom fields. > Really nice. Hope you can get somewhere. > - I don't know why imap email doest work, I get the message that email > should be configured, even if it is in fact configured, well so i will > try to fix that, + adding imap options to the Add user template, > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > - AJAX calendar refresh, and adding standard calendar view on a > floating window. > > - Date field DHTML floating box. > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > - Translation facility, probably a script that reads every lang file, > and organizes it in a HTML form, and then form it regenerate the lang > files, so language translation can be made from web, rather that > getting into the code, + the fact of making it a lot more easier when > adding new definitions and translating them to the other files. > Try the Language Wizard in vtigerforge. This is what I use and I think it is a very good module, it does exactly what you are asking for. > Well with that I think I have lot to play with for some time. > > Thank you, > > Jorge > Joe TSolucio From jorge.torres.maldonado at gmail.com Wed May 2 12:59:12 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:59:12 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638E86A.70707@tsolucio.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <4638E86A.70707@tsolucio.com> Message-ID: <530c7d700705021259r4d70223cmd6981af85d4d1360@mail.gmail.com> Thanks Joe, language module seems awesome On 5/2/07, Joe Bordes wrote: > > Hi Jorge, > > Jorge Torres escribi?: > > Hi, > > > > Since it is now clear that postgres is supported, the only thing would > > be about Enrico's opinion of adb->query_results being resource > > wasting, which is very important regardless of mysql or postgres use, > > Enrico, what are you doing instead of using the query_results method? > > > > About the other thing here is a todo list which could possibly be > > common with vtiger's: > > > > - Use WebWM (webwm.sourceforge.net ), > > instead of porpup windows which are blocked by internet explorer and > > sometimes firefox, also use WebWM for virtual windows, such as the > > ones in editing custom fields. > > > Really nice. Hope you can get somewhere. > > > - I don't know why imap email doest work, I get the message that email > > should be configured, even if it is in fact configured, well so i will > > try to fix that, + adding imap options to the Add user template, > > > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > > > - AJAX calendar refresh, and adding standard calendar view on a > > floating window. > > > > - Date field DHTML floating box. > > > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > > > - Translation facility, probably a script that reads every lang file, > > and organizes it in a HTML form, and then form it regenerate the lang > > files, so language translation can be made from web, rather that > > getting into the code, + the fact of making it a lot more easier when > > adding new definitions and translating them to the other files. > > > Try the Language Wizard in vtigerforge. This is what I use and I think > it is a very good module, it does exactly what you are asking for. > > Well with that I think I have lot to play with for some time. > > > > Thank you, > > > > Jorge > > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/3ed19b0a/attachment-0001.htm From weigelt at metux.de Wed May 2 19:36:53 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 04:36:53 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <20070503023653.GA29236@nibiru.local> * Jorge Torres schrieb: Hi, > Since it is now clear that postgres is supported, the only thing would be > about Enrico's opinion of adb->query_results being resource wasting, which > is very important regardless of mysql or postgres use, Enrico, what are > you doing instead of using the query_results method? As already said: introduced some new functions, which fetch either one record (run_query_record() and run_query_field()) or all records (run_query_allrecords() and run_query_list()) and simply return the data. There are several result types: a) just one scalar: -> run_query_field($query,$fieldname) --> returns an scalar b) just one record: -> run_query_record($query) --> returns an associative array c) an list of scalars -> run_query_list($query,$fieldname) --> returns an array/list of scalars d) an list of records: -> run_query_allreords($query) --> returns an array/list of ass. arrays cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gopals at vtiger.com Wed May 2 21:26:58 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 03 May 2007 09:56:58 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <1178102159.31989.24.camel@joesunix.int> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> <1178102159.31989.24.camel@joesunix.int> Message-ID: <46396492.7010106@vtiger.com> Hi Joe, Sorry for the inconvenience. We don't have issues in providing separate branches for our developer community. Could you please send us your future development plans to philip at vtiger.com so that he will create branches based on your requirements. Regards, Gopal Joe Bordes wrote: > Hi, > > I read this thread and I just keep asking myself: > what am I doing wrong? > > You guys have branches and are participating. I have been asking to help > for a long time now and I am just being ignored. > > I really would like to help and work together. > > Joe > TSolucio > > El mi??, 02-05-2007 a las 09:49 +0530, Gopal escribi??: > >> Hi Jorge, >> >> Thanks for your interest in vtiger CRM project. >> >> Please see my response below (in blue color) >> >> Jorge Torres wrote: >> >>> Hi everyone, >>> >>> First I want to tell you developers that I admire your work. I first >>> downloaded vtiger a few days ago, for customer relationship >>> management at my uncles little ceramic factory, and I was amazed, >>> but after I showed it to him, well, it seems that it is too much for >>> what my uncle wants. >>> >> Gopal: From the Security settings module, you can disable >> modules/fields that are not required. Please get back to me if you >> need any further clarifications. >> >>> I love PHP, and I thought that I could minimize it to what at this >>> moment I need, and in near future add more AJAX to it. I know that >>> may differ a lot from what vtiger golas might be, therefore I want >>> to start a new project at sourceforge.net based on vtigerCRM 5. >>> >> Gopal: Down the road, we are planning to make vtiger CRM - fully >> customizable so that business users configure the vtiger system >> instead of hacking the code. Could you please post your goals, so >> that we will cross-check our road map and let you know our position? >> >>> I don't understand to much about Open Source Licencing restrictions >>> and related stuff, so please excuse my ignorance. My question are: >>> >> Gopal: vtiger CRM code base contains our own contributions and many >> third-party packages. Our own contributions are released under vtiger >> Public License (based on Mozilla Public License). Please refer to the >> following URL for details about licenses of third-party packages: >> >> http://wiki.vtiger.com/index.php/Third_Party_Software >> >>> Can I start a new project at sourceforge based on vtiger? >>> >> Gopal: In general there are no issues in forking open source projects, >> provided you are not violating the Open Source license of your >> predecessor. >> >>> If so, Would I have to cover it under some other new license type? >>> >> Gopal: Release your contributions under some Open Source license which >> meets your requirements. >> >>> Do I need some permit from vtiger team to start such project? >>> >> Gopal: vtiger CRM code base is 100% open source by spirit. Hence you >> may not require special permission from our side. >> >>> I know about removing logos because of trademarks, what else do I >>> have to remove? >>> >> Gopal: Kindly review the vtiger and other third-party licenses with >> your Legal adviser (council) before modifying back-end/front-end code >> base. >> >> On a separate note, our community is actively participating in vtiger >> development. Most of the community members >> (developers/testers/writers/translators) are directly contributing to >> the core code base (For example: PostgreSQL & DMS branches in our >> SVN). >> >> http://vtiger.fosslabs.com >> >> We are also encouraging many add-on projects based on vtiger CRM, >> which cater to the need of user-specific requirements. For more >> details, please refer to our vtigerForge: >> >> http://vtigerforge.com >> >> Best wishes, >> Gopal >> (vtiger - Team Member) >> >>> Well that's it for now, I will continue on my "trying to understand >>> vtiger's code" task, so I will probably have some questions related >>> to developing in short. >>> >>> Thank you very much, >>> >>> >>> Jorge >>> >>> ____________________________________________________________________ >>> >>> _______________________________________________ >>> Reach hundreds of potential candidates - http://jobs.vtiger.com >>> >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070503/f24f5451/attachment.html From jens at Strawberry.COM Wed May 2 23:54:27 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 08:54:27 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503023653.GA29236@nibiru.local>; from Enrico Weigelt on Thu, May 03, 2007 at 04:36:53AM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> Message-ID: <20070503085427.A9675@Strawberry.COM> Hi Enrico, my fixes adress syntactical postgres support only. However yours also seems to improove performance. Is there any chance to have both fixes implemented (@don,richie)? Jens On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Since it is now clear that postgres is supported, the only thing would be > > about Enrico's opinion of adb->query_results being resource wasting, which > > is very important regardless of mysql or postgres use, Enrico, what are > > you doing instead of using the query_results method? > > As already said: introduced some new functions, which fetch either > one record (run_query_record() and run_query_field()) or all records > (run_query_allrecords() and run_query_list()) and simply return the data. > > There are several result types: > > a) just one scalar: -> run_query_field($query,$fieldname) > --> returns an scalar > b) just one record: -> run_query_record($query) > --> returns an associative array > c) an list of scalars -> run_query_list($query,$fieldname) > --> returns an array/list of scalars > d) an list of records: -> run_query_allreords($query) > --> returns an array/list of ass. arrays > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Thu May 3 05:28:02 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 19:28:02 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Jens, I try to test your branch with lxampp 1.5.3a (php 5.1.4) found same error Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 Please give me more information about php,postgresql version ? Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi Enrico, > > my fixes adress syntactical postgres support only. However > yours also seems to improove performance. Is there any chance > to have both fixes implemented (@don,richie)? > > Jens > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Since it is now clear that postgres is supported, the only thing would be > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > is very important regardless of mysql or postgres use, Enrico, what are > > > you doing instead of using the query_results method? > > > > As already said: introduced some new functions, which fetch either > > one record (run_query_record() and run_query_field()) or all records > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > There are several result types: > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > --> returns an scalar > > b) just one record: -> run_query_record($query) > > --> returns an associative array > > c) an list of scalars -> run_query_list($query,$fieldname) > > --> returns an array/list of scalars > > d) an list of records: -> run_query_allreords($query) > > --> returns an array/list of ass. arrays > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Thu May 3 06:40:04 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:40:04 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503154004.D6711@Strawberry.COM> Hi, my port is running on Solaris 10, postgres 8.1.2, PHP 5.1.4 Jens On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Thu May 3 06:56:34 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:56:34 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503155634.A11877@Strawberry.COM> Hi, I've verfied the 5.1_jens PearDatabase.php to my running version and found no differences. Could you please check the one attached to this mail to the one you're testing against? Kind regards, Jens Hamisch On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 -------------- next part -------------- info("PearDatabse ->".print_r($msg,true)); } else { $log1->info("PearDatabase ->".$msg); } return $msg; } function setDieOnError($value){ $this->dieOnError = $value; } function setDatabaseType($type){ $this->dbType = $type; } function setUserName($name){ $this->userName = $name; } function setOption($name, $value){ if(isset($this->dbOptions)) $this->dbOptions[$name] = $value; if(isset($this->database)) $this->database->setOption($name, $value); } function setUserPassword($pass){ $this->userPassword = $pass; } function setDatabaseName($db){ $this->dbName = $db; } function setDatabaseHost($host){ $this->dbHostName = $host; } function getDataSourceName(){ return $this->dbType. "://".$this->userName.":".$this->userPassword."@". $this->dbHostName . "/". $this->dbName; } function startTransaction() { $this->checkConnection(); $this->println("TRANS Started"); $this->database->StartTrans(); } function completeTransaction() { if($this->database->HasFailedTrans()) $this->println("TRANS Rolled Back"); else $this->println("TRANS Commited"); $this->database->CompleteTrans(); $this->println("TRANS Completed"); } /* ADODB converted * function checkError($msg='', $dieOnError=false) * { * if($this->dbType == "mysql") * { * if (mysql_errno()) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } * return false; * } * else * { * if(!isset($this->database)) * { * $this->log->error("Database Is Not Connected"); * return true; * } * if(DB::isError($this->database)) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal($msg.$this->database->getMessage()); * die ($msg.$this->database->getMessage()); * } else { * $this->log->error($msg.$this->database->getMessage()); * } * return true; * } * } * return false; * } */ function checkError($msg='', $dieOnError=false) { /* * if($this->database->ErrorNo()) * { * if($this->dieOnError || $dieOnError) * { * $this->println("ADODB error ".$this->database->ErrorNo()); * die ($msg."ADODB error ".$this->database->ErrorNo()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } */ if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); die ($msg."ADODB error ".$msg."->".$this->database->ErrorMsg()); } else { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); } return false; } function change_key_case($arr) { return is_array($arr)?array_change_key_case($arr):$arr; } var $req_flist; /** * @return void * @desc checks if a connection exists if it does not it closes the connection * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. * All Rights Reserved.. * Contributor(s): ______________________________________.. */ function checkConnection(){ global $log; if(!isset($this->database)) { $this->println("TRANS creating new connection"); /* * $flist=get_included_files(); * foreach($flist as $key=>$value) * { * if(!strstr($value,'\\modules') && !strstr($value,'\\data')) * unset($flist[$key]); * } * $this->println($flist); */ $this->connect(false); } else { //$this->println("checkconnect using old connection"); } } /* ADODB converted * function query($sql, $dieOnError=false, $msg='') * { * $this->println("query ".$sql); * $this->log->info('Query:' . $sql); * $this->checkConnection(); * $this->query_time = microtime(); * if($this->dbType == "mysql") * { * $result =& mysql_query($sql); * $this->lastmysqlrow = -1; * } else { * $result =& $this->database->query($sql); * } * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function query($sql, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB query ".$sql); $log->debug('query being executed : '.$sql); $this->checkConnection(); $result = & $this->database->Execute($sql); $this->lastmysqlrow = -1; if(!$result)$this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); return $result; } function getEmptyBlob() { //if(dbType=="oci8") return 'empty_blob()'; //else return 'null'; return 'null'; } function updateBlob($tablename, $colname, $id, $data) { $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id); $this->checkConnection(); $result = $this->database->UpdateBlob($tablename, $colname, $data, $id); $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id." status=".$result); return $result; } function updateBlobFile($tablename, $colname, $id, $filename) { $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename); $this->checkConnection(); $result = $this->database->UpdateBlobFile($tablename, $colname, $filename, $id); $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename." status=".$result); return $result; } /* ADODB converted * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') * { * if($this->dbType == "mysql") * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); * $this->lastsql = $sql; * * $this->checkConnection(); * $this->query_time = microtime(); * $result =& $this->database->limitQuery($sql,$start, $count); * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count); $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count); $this->checkConnection(); $result =& $this->database->SelectLimit($sql,$count,$start); if(!$result) $this->checkError($msg.' Limit Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getOne($sql, $dieOnError=false, $msg='') * { * $this->log->info('Get One:' . $sql); * $this->checkConnection(); * if($this->dbType == "mysql"){ * $queryresult =& $this->query($sql, $dieOnError, $msg); * $result =& mysql_result($queryresult,0); * } else { * $result =& $this->database->getOne($sql); * } * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); $this->checkConnection(); $result =& $this->database->GetOne($sql); if(!$result) $this->checkError($msg.' Get one Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getFieldsArray(&$result) * { * $field_array = array(); * * if(! isset($result) || empty($result)) * { * return 0; * } * * if($this->dbType == "mysql") * { * $i = 0; * while ($i < mysql_num_fields($result)) * { * $meta = mysql_fetch_field($result, $i); * * if (!$meta) * { * return 0; * } * * array_push($field_array,$meta->name); * * $i++; * } * } * else * { * $arr = tableInfo($result); * foreach ($arr as $index=>$subarr) * { * array_push($field_array,$subarr['name']); * } * } * * return $field_array; * } */ function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); $field_array = array(); if(! isset($result) || empty($result)) { return 0; } $i = 0; $n = $result->FieldCount(); while ($i < $n) { $meta = $result->FetchField($i); if (!$meta) { return 0; } array_push($field_array,$meta->name); $i++; } //$this->println($field_array); return $field_array; } /* ADODB Converted * function getRowCount(&$result) * { * if(isset($result) && !empty($result)) * if($this->dbType == "mysql"){ * return mysql_numrows($result); * } else { * return $result->numRows(); * } * return 0; * } */ function getRowCount(&$result){ global $log; //$this->println("ADODB getRowCount"); if(isset($result) && !empty($result)) $rows= $result->RecordCount(); //$this->println("ADODB getRowCount rows=".$rows); //$log->debug('getRowCount rows= '.$rows); return $rows; } /* ADODB newly added. replacement for mysql_num_rows */ function num_rows(&$result) { return $this->getRowCount($result); } /* ADODB newly added. replacement form mysql_num_fields */ function num_fields(&$result) { return $result->FieldCount(); } /* ADODB newly added. replacement for mysql_fetch_array() */ function fetch_array(&$result) { if($result->EOF) { //$this->println("ADODB fetch_array return null"); return NULL; } return $this->change_key_case($result->FetchRow()); } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); //Commented strip_selected_tags and added to_html function for HTML tags vulnerability //$coldata = strip_selected_tags($rowdata[$col],'script'); $coldata = to_html($rowdata[$col]); //$this->println("ADODB query_result ". $coldata); return $coldata; } /* ADODB Converted * function getAffectedRowCount(&$result) * { * if($this->dbType == "mysql"){ * return mysql_affected_rows(); * } * else { * return $result->affectedRows(); * } * return 0; * } */ function getAffectedRowCount(&$result) { global $log; //$this->println("ADODB getAffectedRowCount"); $log->debug('getAffectedRowCount'); $rows =$this->database->Affected_Rows(); //$this->println("ADODB getAffectedRowCount rows=".rows); $log->debug('getAffectedRowCount rows = '.$rows); return $rows; } /* ADODB converted * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ * $result = $this->query($sql, $dieOnError, $msg); * * if($this->getRowCount($result ) == 1) * return to_html($result, $encode); * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); * return ''; * } */ function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); if($this->getRowCount($result ) == 1) return $result; $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } /* ADODB converted * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) * { * if(isset($result) && $rowNum < 0) * { * if($this->dbType == "mysql"){ * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); * } * if($this->dbType == "mysql"){ * if($this->getRowCount($result) > $rowNum){ * mysql_data_seek($result, $rowNum); * } * $this->lastmysqlrow = $rowNum; * * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); * if($encode) * return array_map('to_html', $row); * return $row; * } */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { //$this->println("ADODB fetchByAssoc ".$rowNum." fetch mode=".$adb->database->$ADODB_FETCH_MODE); if($result->EOF) { $this->println("ADODB fetchByAssoc return null"); return NULL; } if(isset($result) && $rowNum < 0) { $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); //$this->println("ADODB fetchByAssoc r< 0 isarray r=".is_array($row)." r1=".is_array($row[1])); //$this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); //$this->println("ADODB fetchByAssoc r< 0 not array r1=".$row[1]); return $row; } //$this->println("ADODB fetchByAssoc after if ".$rowNum); if($this->getRowCount($result) > $rowNum) { $result->Move($rowNum); } $this->lastmysqlrow = $rowNum; //srini - think about this $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); $this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); return $row; } /* ADODB converted * function getNextRow(&$result, $encode=true) * { * if(isset($result)){ * $row = $result->fetchRow(); * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * return null; * } */ function getNextRow(&$result, $encode=true){ global $log; //$this->println("ADODB getNextRow"); $log->info('getNextRow'); if(isset($result)){ $row = $this->change_key_case($result->FetchRow()); if($row && $encode&& is_array($row)) return array_map('to_html', $row); return $row; } return null; } function fetch_row(&$result, $encode=true) { return $this->getNextRow($result); } function field_name(&$result, $col) { return $result->FetchField($col); } function getQueryTime(){ return $this->query_time; } /* * function execute($stmt, $data, $dieOnError=false, $msg=''){ * $this->log->info('Executing:'.$stmt); * $this->checkConnection(); * $this->query_time = microtime(); * $prepared = $this->database->prepare($stmt); * $result = execute($stmt, $data); * $this->query_time = microtime() - $this->query_time; * //$this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); * return $result; * } */ /* adodb converted * function connect($dieOnError = false){ * $this->println("connect"); * global $dbconfigoption; * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); * @mysql_select_db($this->dbName) or die( "Unable to select database"); * if(!$this->database){ * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); * if($this->connection == false && $dbconfigoption['persistent'] == true){ * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; * } * } * } * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); * if($this->checkError('Could Not Connect:', $dieOnError)) * $this->log->info("connected to db"); * * } */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); /* * $driver='mysql'; * $server='srinivasan'; * $user='root'; * $password=''; * $database='vtigercrm3_2'; * * $this->database = ADONewConnection($driver); * * #$this->database->debug = true; * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); */ /* * $this->dbHostName="srinivasan:1521"; * $this->userName="vt4"; * $this->userPassword="vt4"; * $this->dbName="srini"; * $this->dbType="oci8"; */ if(!isset($this->dbType)) { $this->println("ADODB Connect : DBType not specified"); return; } $this->database = ADONewConnection($this->dbType); //$this->database->debug = true; $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName); $this->database->LogSQL($this->enableSQLlog); //$this->database->SetFetchMode(ADODB_FETCH_ASSOC); //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } /* * function PearDatabase(){ * //$this->println("PearDatabase"); * global $currentModule; * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); * $this->resetSettings(); * } * * function resetSettings(){ * global $dbconfig, $dbconfigoption; * $this->disconnect(); * $this->setDatabaseType($dbconfig['db_type']); * $this->setUserName($dbconfig['db_username']); * $this->setUserPassword($dbconfig['db_password']); * $this->setDatabaseHost( $dbconfig['db_hostname']); * $this->setDatabaseName($dbconfig['db_name']); * $this->dbOptions = $dbconfigoption; * $this->enableSQLlog = ($dbconfig['log_sql'] == true); * //$this->println("resetSettings log=".$this->enableSQLlog); * //$this->println($dbconfig); * //if($this->dbType != "mysql"){ * // require_once( 'DB.php' ); * //} * } */ function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); global $currentModule; $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); $this->resetSettings($dbtype,$host,$dbname,$username,$passwd); } function resetSettings($dbtype,$host,$dbname,$username,$passwd) { global $dbconfig, $dbconfigoption; if($host == '') { $this->disconnect(); $this->setDatabaseType($dbconfig['db_type']); $this->setUserName($dbconfig['db_username']); $this->setUserPassword($dbconfig['db_password']); $this->setDatabaseHost( $dbconfig['db_hostname']); $this->setDatabaseName($dbconfig['db_name']); $this->dbOptions = $dbconfigoption; if($dbconfig['log_sql']) $this->enableSQLlog = ($dbconfig['log_sql'] == true); //$this->println("resetSettings log=".$this->enableSQLlog); //$this->println($dbconfig); /*if($this->dbType != "mysql"){ require_once( 'DB.php' ); }*/ } else { $this->disconnect(); $this->setDatabaseType($dbtype); $this->setDatabaseName($dbname); $this->setUserName($username); $this->setUserPassword($passwd); $this->setDatabaseHost( $host); } } function quote($string){ return $this->database->qstr($string); } /* ADODB converted * function disconnect() { * $this->println("disconnect"); * if(isset($this->database)){ * if($this->dbType == "mysql"){ * mysql_close($this->database); * } else { * $this->database->disconnect(); * } * unset($this->database); * } * } */ function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ if($this->dbType == "mysql"){ mysql_close($this->database); } else { $this->database->disconnect(); } unset($this->database); } } function setDebug($value) { $this->database->debug = $value; } // ADODB newly added methods function createTables($schemaFile, $dbHostName=false, $userName=false, $userPassword=false, $dbName=false, $dbType=false) { $this->println("ADODB createTables ".$schemaFile); if($dbHostName!=false) $this->dbHostName=$dbHostName; if($userName!=false) $this->userName=$userPassword; if($userPassword!=false) $this->userPassword=$userPassword; if($dbName!=false) $this->dbName=$dbName; if($dbType!=false) $this->dbType=$dbType; //$db = ADONewConnection($this->dbType); $this->checkConnection(); $db = $this->database; //$db->debug = true; //$this->println("ADODB createTables connect status=".$db->Connect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName)); $schema = new adoSchema( $db ); //Debug Adodb XML Schema $sehema->XMLS_DEBUG = TRUE; //Debug Adodb $sehema->debug = true; $sql = $schema->ParseSchema( $schemaFile ); $this->println("--------------Starting the table creation------------------"); //$this->println($sql); //integer ExecuteSchema ([array $sqlArray = NULL], [boolean $continueOnErr = NULL]) $result = $schema->ExecuteSchema( $sql, true ); if($result) print $db->errorMsg(); // needs to return in a decent way $this->println("ADODB createTables ".$schemaFile." status=".$result); return $result; } function createTable($tablename, $flds) { $this->println("ADODB createTable table=".$tablename." flds=".$flds); $this->checkConnection(); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $dict = NewDataDictionary($this->database); $sqlarray = $dict->CreateTableSQL($tablename, $flds); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB createTable table=".$tablename." flds=".$flds." status=".$result); return $result; } function alterTable($tablename, $flds, $oper) { $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $this->checkConnection(); $dict = NewDataDictionary($this->database); //$sqlarray = new Array(); if($oper == 'Add_Column') { $sqlarray = $dict->AddColumnSQL($tablename, $flds); } else if($oper == 'Delete_Column') { $sqlarray = $dict->DropColumnSQL($tablename, $flds); } $this->println("sqlarray"); $this->println($sqlarray); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper." status=".$result); return $result; } function getColumnNames($tablename) { $this->println("ADODB getColumnNames table=".$tablename); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); //$colNames = new Array(); $i=0; foreach($adoflds as $fld) { $colNames[$i] = $fld->name; $i++; } return $colNames; } function formatString($tablename,$fldname, $str) { //$this->println("ADODB formatString table=".$tablename." fldname=".$fldname." str=".$str); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); foreach ( $adoflds as $fld ) { //$this->println("ADODB formatString adofld =".$fld->name); if(strcasecmp($fld->name,$fldname)==0) { //$this->println("ADODB formatString fldname=".$fldname." fldtype =".$fld->type); $fldtype =strtoupper($fld->type); if(strcmp($fldtype,'CHAR')==0 || strcmp($fldtype,'VARCHAR') == 0 || strcmp($fldtype,'VARCHAR2') == 0 || strcmp($fldtype,'LONGTEXT')==0 || strcmp($fldtype,'TEXT')==0) { //$this->println("ADODB return else normal"); return $this->database->Quote($str); } else if(strcmp($fldtype,'DATE') ==0 || strcmp($fldtype,'TIMESTAMP')==0) { return $this->formatDate($str); } else { return $str; } } } $this->println("format String Illegal field name ".$fldname); return $str; } function formatDate($datetime) { $this->checkConnection(); //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); //if($db->dbType=='mysql') return $this->quote($date); return $date; } function getDBDateString($datecolname) { $this->checkConnection(); $db = &$this->database; $datestr = $db->SQLDate("Y-m-d, H:i:s" ,$datecolname); return $datestr; } function getUniqueID($seqname) { global $log; $this->checkConnection(); if( $this->dbType == "pgsql") { $keytab = $this->database->MetaPrimaryKeys($seqname); if( count( $keytab) > 0) { $log->info("PearDatabase: Postgres getUniqueID hack: ".$seqname."_".$keytab[0]."_seq"); return $this->database->GenID($seqname."_".$keytab[0]."_seq",1); } else { $log->info("PearDatabase: Problem: getUniqueID but no key for '$seqname'"); } } return $this->database->GenID($seqname."_seq",1); } function get_tables() { $this->checkConnection(); $result = & $this->database->MetaTables('TABLES'); $this->println($result); return $result; } } /* End of class */ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); ?> From dome at tel.co.th Thu May 3 07:40:59 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 21:40:59 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503155634.A11877@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> <20070503155634.A11877@Strawberry.COM> Message-ID: <8ccbff060705030740u1f6df32cjd133c656035acfe8@mail.gmail.com> Same problem. when create contact Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 When create new note Warning: mktime() expects parameter 6 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1388 Warning: mktime() expects parameter 1 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1389 Setting->orgunit Fatal error: Call to undefined method OrgUnit::getListQuery() in /opt/lampp/htdocs/vtiger/include/utils/ListViewUtils.php on line 2388 Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi, > > I've verfied the 5.1_jens PearDatabase.php to my running version > and found no differences. Could you please check the one attached to > this mail to the one you're testing against? > > Kind regards, > Jens Hamisch > > On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > > Jens, > > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > > found same error > > Fatal error: Call to a member function Move() on a non-object in > > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > > > Please give me more information about php,postgresql version ? > > > > Dome C. > > > > On 5/3/07, Jens Hamisch wrote: > > > > > > Hi Enrico, > > > > > > my fixes adress syntactical postgres support only. However > > > yours also seems to improove performance. Is there any chance > > > to have both fixes implemented (@don,richie)? > > > > > > Jens > > > > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > > > > > > Hi, > > > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > > you doing instead of using the query_results method? > > > > > > > > As already said: introduced some new functions, which fetch either > > > > one record (run_query_record() and run_query_field()) or all records > > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > > > There are several result types: > > > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > > --> returns an scalar > > > > b) just one record: -> run_query_record($query) > > > > --> returns an associative array > > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > > --> returns an array/list of scalars > > > > d) an list of records: -> run_query_allreords($query) > > > > --> returns an array/list of ass. arrays > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > From weigelt at metux.de Thu May 3 09:24:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:24:44 +0200 Subject: [Vtigercrm-developers] [PATCH] new functions and some cleanups Message-ID: <20070503162443.GA22625@nibiru.local> Hi folks, here are some patches (against latest trunk), which introduce the new functions and so some cleanups. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- ## ## takes db_port directly from the request variable, since register_globals ## is disabled most times and deprecated. ## diff -ruN upstream-10823/install/4createConfigFile.php working/install/4createConfigFile.php --- upstream-10823/install/4createConfigFile.php 2007-05-03 17:42:54.000000000 +0200 +++ working/install/4createConfigFile.php 2007-05-03 17:53:31.000000000 +0200 @@ -58,11 +58,14 @@ else { $db_hostname = $_REQUEST['db_hostname']; - if($db_type == "pgsql") - $db_port = '5432'; - else - $db_port = '3306'; - } + switch($_REQUEST{'db_type'}) + { + case 'pgsql': $db_port = '5432'; break; + case 'mysql': $db_port = '3306'; break; + default: + throw new Exception("unsupported db_type: \""+$_REQUEST{'db_type'}."\""); + } + } } if (isset($_REQUEST['db_username']))$db_username = $_REQUEST['db_username']; ## ## fixes error w/ duplicated class definitions. not sure if this is really correct ;-O ## diff -ruN upstream-10823/modules/Calendar/Date.php working/modules/Calendar/Date.php --- upstream-10823/modules/Calendar/Date.php 2007-05-03 17:43:39.000000000 +0200 +++ working/modules/Calendar/Date.php 2007-05-03 17:53:31.000000000 +0200 @@ -9,7 +9,7 @@ * ********************************************************************************/ -class DateTime +class X_DateTime { var $second = '00'; var $minute = '00'; -------------- next part -------------- ## ## adds new functions to the PearDatabase class to come around the whole ## broken query_result() idea ;-O ## diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 17:50:00.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:10:05.000000000 +0200 @@ -433,6 +433,144 @@ } return $this->change_key_case($result->FetchRow()); } + function run_query_record_html($query) + { + if (!is_array($rec = $this->run_query_record($query))) +// throw new Exception("no rec: $query"); + return $rec; + + foreach ($rec as $walk => $cur) + $r[$walk] = to_html($cur); + + return $r; + } + + function sql_quote($data) + { + if (is_array($data)) + { + switch($data{'type'}) + { + case 'text': + case 'numeric': + case 'integer': + case 'oid': + return $this->quote($data{'value'}); + break; + case 'timestamp': + return $this->formatDate($data{'value'}); + break; + default: + throw new Exception("unhandled type: ".serialize($cur)); + } + } + else + return $this->quote($data); + } + + function sql_insert_data($table, $data) + { + if (!$table) + throw new Exception("missing table name"); + if (!is_array($data)) + throw new Exception("data must be an array"); + if (!count($table)) + throw new Exception("no data given"); + + $sql_fields = ''; + $sql_data = ''; + foreach($data as $walk => $cur) + { + $sql_fields .= ($sql_fields?',':'').$walk; + $sql_data .= ($sql_data?',':'').$this->sql_quote($cur); + } + + return 'INSERT INTO '.$table.' ('.$sql_fields.') VALUES ('.$sql_data.')'; + } + + function run_insert_data($table,$data) + { + $query = $this->sql_insert_data($table,$data); + $res = $this->query($query); + $this->query("commit;"); + } + + function run_query_record($query) + { + $result = $this->query($query); + if (!$result) + return; +// throw new Exception("empty result !"); + + if (!is_object($result)) + throw new Exception("query \"$query\" failed: ".serialize($result)); + $res = $result->FetchRow(); + $rowdata = $this->change_key_case($res); + return $rowdata; + } + + function run_query_allrecords($query) + { + $result = $this->query($query); + $records = array(); + $sz = $this->num_rows($result); + for ($i=0; $i<$sz; $i++) + $records[$i] = $this->change_key_case($result->FetchRow()); + return $records; + } + + function run_query_field($query,$field) + { + $rowdata = $this->run_query_record($query); + return $rowdata{$field}; + } + + function run_query_list($query,$field) + { + $records = $this->run_query_allrecords($query); + foreach($records as $walk => $cur) + $list[] = $cur{$field}; + } + + function run_query_field_html($query,$field) + { + return to_html($this->run_query_field($query,$field)); + } + + function result_get_next_record($result) + { + return $this->change_key_case($result->FetchRow()); + } + + // create an IN expression from an array/list + function sql_expr_datalist($a) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur); + + return ' ( '.$l.' ) '; + } + + // create an IN expression from an record list, take $field within each record + function sql_expr_datalist_from_records($a,$field) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!$field) + throw new Exception("missing field"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur{$field}); + + return ' ( '.$l.' ) '; + } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) -------------- next part -------------- diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 18:13:24.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:17:22.000000000 +0200 @@ -104,46 +104,6 @@ $this->println("TRANS Completed"); } -/* ADODB converted - * function checkError($msg='', $dieOnError=false) - * { - * if($this->dbType == "mysql") - * { - * if (mysql_errno()) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); - * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); - * } else { - * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); - * } - * return true; - * } - * return false; - * } - * else - * { - * if(!isset($this->database)) - * { - * $this->log->error("Database Is Not Connected"); - * return true; - * } - * if(DB::isError($this->database)) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal($msg.$this->database->getMessage()); - * die ($msg.$this->database->getMessage()); - * } else { - * $this->log->error($msg.$this->database->getMessage()); - * } - * return true; - * } - * } - * return false; - * } - */ function checkError($msg='', $dieOnError=false) { @@ -160,7 +120,7 @@ * return true; * } */ - + if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); @@ -268,24 +228,6 @@ return $result; } -/* ADODB converted - * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') - * { - * if($this->dbType == "mysql") - * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); - * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); - * $this->lastsql = $sql; - * - * $this->checkConnection(); - * $this->query_time = microtime(); - * $result =& $this->database->limitQuery($sql,$start, $count); - * $this->query_time = microtime() - $this->query_time; - * $this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; @@ -297,22 +239,6 @@ return $result; } -/* ADODB converted - * function getOne($sql, $dieOnError=false, $msg='') - * { - * $this->log->info('Get One:' . $sql); - * $this->checkConnection(); - * if($this->dbType == "mysql"){ - * $queryresult =& $this->query($sql, $dieOnError, $msg); - * $result =& mysql_result($queryresult,0); - * } else { - * $result =& $this->database->getOne($sql); - * } - * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); @@ -322,46 +248,6 @@ return $result; } -/* ADODB converted - * function getFieldsArray(&$result) - * { - * $field_array = array(); - * - * if(! isset($result) || empty($result)) - * { - * return 0; - * } - * - * if($this->dbType == "mysql") - * { - * $i = 0; - * while ($i < mysql_num_fields($result)) - * { - * $meta = mysql_fetch_field($result, $i); - * - * if (!$meta) - * { - * return 0; - * } - * - * array_push($field_array,$meta->name); - * - * $i++; - * } - * } - * else - * { - * $arr = tableInfo($result); - * foreach ($arr as $index=>$subarr) - * { - * array_push($field_array,$subarr['name']); - * } - * } - * - * return $field_array; - * } - */ - function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); @@ -586,19 +472,6 @@ return $coldata; } -/* ADODB Converted - * function getAffectedRowCount(&$result) - * { - * if($this->dbType == "mysql"){ - * return mysql_affected_rows(); - * } - * else { - * return $result->affectedRows(); - * } - * return 0; - * } - */ - function getAffectedRowCount(&$result) { global $log; @@ -610,17 +483,6 @@ return $rows; } -/* ADODB converted - * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ - * $result = $this->query($sql, $dieOnError, $msg); - * - * if($this->getRowCount($result ) == 1) - * return to_html($result, $encode); - * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); - * return ''; - * } - */ - function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); @@ -630,40 +492,6 @@ $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } - - -/* ADODB converted - * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) - * { - * if(isset($result) && $rowNum < 0) - * { - * if($this->dbType == "mysql"){ - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); - * } - * if($this->dbType == "mysql"){ - * if($this->getRowCount($result) > $rowNum){ - * mysql_data_seek($result, $rowNum); - * } - * $this->lastmysqlrow = $rowNum; - * - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); - * if($encode) - * return array_map('to_html', $row); - * return $row; - * } - */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { @@ -703,20 +531,7 @@ return array_map('to_html', $row); return $row; } - -/* ADODB converted - * function getNextRow(&$result, $encode=true) - * { - * if(isset($result)){ - * $row = $result->fetchRow(); - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * return null; - * } - */ - + function getNextRow(&$result, $encode=true){ global $log; @@ -744,69 +559,12 @@ function getQueryTime(){ return $this->query_time; } - -/* - * function execute($stmt, $data, $dieOnError=false, $msg=''){ - * $this->log->info('Executing:'.$stmt); - * $this->checkConnection(); - * $this->query_time = microtime(); - * $prepared = $this->database->prepare($stmt); - * $result = execute($stmt, $data); - * $this->query_time = microtime() - $this->query_time; - * //$this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); - * return $result; - * } - */ - - -/* adodb converted - * function connect($dieOnError = false){ - * $this->println("connect"); - * global $dbconfigoption; - * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ - * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); - * @mysql_select_db($this->dbName) or die( "Unable to select database"); - * if(!$this->database){ - * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); - * if($this->connection == false && $dbconfigoption['persistent'] == true){ - * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; - * } - * } - * } - * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); - * if($this->checkError('Could Not Connect:', $dieOnError)) - * $this->log->info("connected to db"); - * - * } - */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); - -/* - * $driver='mysql'; - * $server='srinivasan'; - * $user='root'; - * $password=''; - * $database='vtigercrm3_2'; - * - * $this->database = ADONewConnection($driver); - * - * #$this->database->debug = true; - * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); - */ - -/* - * $this->dbHostName="srinivasan:1521"; - * $this->userName="vt4"; - * $this->userPassword="vt4"; - * $this->dbName="srini"; - * $this->dbType="oci8"; - */ if(!isset($this->dbType)) { @@ -823,32 +581,6 @@ //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } -/* - * function PearDatabase(){ - * //$this->println("PearDatabase"); - * global $currentModule; - * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); - * $this->resetSettings(); - * } - * - * function resetSettings(){ - * global $dbconfig, $dbconfigoption; - * $this->disconnect(); - * $this->setDatabaseType($dbconfig['db_type']); - * $this->setUserName($dbconfig['db_username']); - * $this->setUserPassword($dbconfig['db_password']); - * $this->setDatabaseHost( $dbconfig['db_hostname']); - * $this->setDatabaseName($dbconfig['db_name']); - * $this->dbOptions = $dbconfigoption; - * $this->enableSQLlog = ($dbconfig['log_sql'] == true); - * //$this->println("resetSettings log=".$this->enableSQLlog); - * //$this->println($dbconfig); - * //if($this->dbType != "mysql"){ - * // require_once( 'DB.php' ); - * //} - * } - */ - function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); @@ -893,21 +625,6 @@ return $this->database->qstr($string); } - -/* ADODB converted - * function disconnect() { - * $this->println("disconnect"); - * if(isset($this->database)){ - * if($this->dbType == "mysql"){ - * mysql_close($this->database); - * } else { - * $this->database->disconnect(); - * } - * unset($this->database); - * } - * } - */ - function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ @@ -1054,7 +771,6 @@ //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); - //if($db->dbType=='mysql') return $this->quote($date); return $date; } @@ -1083,6 +799,3 @@ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); - - -?> From weigelt at metux.de Thu May 3 09:33:22 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:33:22 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <20070503163322.GB22625@nibiru.local> * Jens Hamisch schrieb: Hi Enrico, > my fixes adress syntactical postgres support only. I'll have a look at it. Could you please give me some quick cmdline to fetch it (I'm not really experienced w/ svn) or an patch against latest release or trunk ? > However yours also seems to improove performance. Is there any > chance to have both fixes implemented (@don,richie) ? Well, let's try it step by step :) I've posted a first set of patches some mins ago. They should not break anything, just add the new functions and clean up old comments, etc. Would be great if you could check them if they fit your branch. IMHO they should be good enough to get into upstream quickly. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Thu May 3 09:48:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:48:09 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... Message-ID: <20070503164809.GA13215@nibiru.local> Hi folks, I've got lots of cases where PHP spits out an error message like: "Catchable fatal error: Object of class Accounts could not be converted to string in ....." This is triggered by the $log->debug() calls at the head of many functions, where an log message is cat'ed from the parameters. Obviously PHP does not know what to do with objects if they should be accessed as strings. No idea if there's an option for controlling that or whether it depends on the PHP version. For now I simply comment out these lines at my site, but that's proably not the solution. How can we cope with these cases ? Write an generic ObjToString() function which handles that (checks if its an object and then prints proper info, etc) or add an toString() method to all classes ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Thu May 3 11:03:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Thu, 03 May 2007 20:03:14 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... In-Reply-To: <20070503164809.GA13215@nibiru.local> References: <20070503164809.GA13215@nibiru.local> Message-ID: <463A23E2.9000603@tsolucio.com> Hi, All entities (except Users) inherit from crmentity, so what I do is add the toString function in data/crmentity.php to avoid the error. Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > I've got lots of cases where PHP spits out an error message like: > > "Catchable fatal error: Object of class Accounts could not > be converted to string in ....." > > This is triggered by the $log->debug() calls at the head of many > functions, where an log message is cat'ed from the parameters. > Obviously PHP does not know what to do with objects if they > should be accessed as strings. No idea if there's an option for > controlling that or whether it depends on the PHP version. > > For now I simply comment out these lines at my site, but that's > proably not the solution. > > How can we cope with these cases ? > > Write an generic ObjToString() function which handles that > (checks if its an object and then prints proper info, etc) > or add an toString() method to all classes ? > > > cu > From weigelt at metux.de Fri May 4 07:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 4 May 2007 16:47:48 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! Message-ID: <20070504144747.GB14102@nibiru.local> Hi folks, I'm currently trying out the 5.1_jens branch. It seems really broken :(( a) I had to add __toString() methods to certain objects b) The getOrgUnits() function is missing. I couldn't find anything about it on the web. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Sat May 5 11:28:16 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Sat, 5 May 2007 20:28:16 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070504144747.GB14102@nibiru.local>; from Enrico Weigelt on Fri, May 04, 2007 at 04:47:48PM +0200 References: <20070504144747.GB14102@nibiru.local> Message-ID: <20070505202816.A19389@Strawberry.COM> Hi, I'm going to have a look at this. The branch is just a copy of the definitely productive version I'm running here. Is there any limit on your (personal) mailbox? I may send an TAR archive to you ... Jens On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I'm currently trying out the 5.1_jens branch. > It seems really broken :(( > > a) I had to add __toString() methods to certain objects > > b) The getOrgUnits() function is missing. I couldn't find anything > about it on the web. > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Sat May 5 14:11:07 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Sun, 6 May 2007 04:11:07 +0700 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <8ccbff060705051411s2f06c50aufa1549505a3f018e@mail.gmail.com> send me please dome at tel.co.th Thanks Dome C. On 5/6/07, Jens Hamisch wrote: > > Hi, > > > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... > > > Jens > > > On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > > > Hi folks, > > > > > > I'm currently trying out the 5.1_jens branch. > > It seems really broken :(( > > > > a) I had to add __toString() methods to certain objects > > > > b) The getOrgUnits() function is missing. I couldn't find anything > > about it on the web. > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From weigelt at metux.de Sun May 6 08:54:04 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Sun, 6 May 2007 17:54:04 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <20070506155404.GA18277@nibiru.local> * Jens Hamisch schrieb: Hi, > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... Okay, go ahead :) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 05:57:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 14:57:28 +0200 Subject: [Vtigercrm-developers] 1/2 OT: diff + skip files Message-ID: <20070507125728.GA999@nibiru.local> Hi folks, could anyone give me an tip how to skip certain files on diff ? I'm currently merging jens' personal copy with the 5.1_jens branch from SVN and there are lots of autogenerated files, which should be skipped (to reduce manual work on the diffs). cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 06:01:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 15:01:49 +0200 Subject: [Vtigercrm-developers] jens' tree vs 5.1_jens Message-ID: <20070507130149.GB999@nibiru.local> Hi folks, Jens has sent me his personal tree (which he considered stable). There're a lot of differences to the 5.1_jens branch in SVN. I'm currently working on merging his changes and putting them into a couple of patch files. Would be great if they'd go into SVN very soon. In the next step we should merge this branch with the current trunk. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 11:00:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 20:00:41 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount Message-ID: <20070508180041.GA4205@nibiru.local> Hi folks, while just filing an invoice, I got into big trouble: It refuses non-integer amounts ! For service billing this is really bad. You can't assume, all works are done in an hourly raster. How can I fix this ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Tue May 8 11:47:20 2007 From: joe at tsolucio.com (Joe Bordes) Date: Tue, 08 May 2007 20:47:20 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <20070508180041.GA4205@nibiru.local> References: <20070508180041.GA4205@nibiru.local> Message-ID: <4640C5B8.2010601@tsolucio.com> Hi, Look in the forums/wiki, it has something to do with changing the type of a field in vtiger_inventoryproductrel Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > while just filing an invoice, I got into big trouble: > It refuses non-integer amounts ! > > For service billing this is really bad. You can't assume, all > works are done in an hourly raster. > > How can I fix this ? > > > cu > From weigelt at metux.de Tue May 8 12:01:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:01:07 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <4640C5B8.2010601@tsolucio.com> References: <20070508180041.GA4205@nibiru.local> <4640C5B8.2010601@tsolucio.com> Message-ID: <20070508190106.GA17322@nibiru.local> * Joe Bordes schrieb: Hi, > Look in the forums/wiki, it has something to do with changing > the type of a field in vtiger_inventoryproductrel why the hell the quantity an int instead of numeric ?! In which places do I have to change it to fix it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:34:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:34:33 +0200 Subject: [Vtigercrm-developers] RFC: schema versioning Message-ID: <20070508193433.GB17322@nibiru.local> Hi folks, as some of you probably might have realized that upgrading database schema is an very tricky issue. I don't believe that an universal schema generator and updater, which really *WORKS* can be built with reasonable effort, at least not if the RDBMS should not just be abused as spreadsheet storage. The various RDBMS'es *are* different and so require different schemata. The big problem is not writing proper SQL commands, but keeping track of current schema version and find the right commands for update. So my suggestion: * add an new table "schema_version" which contains an list of schema components (identified by some unique name) and their current version (which is an sequential number). * schema updates are done, for each component separately, strictly sequential. each RDBMS has its own SQL scripts. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:41:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:41:33 +0200 Subject: [Vtigercrm-developers] [BUG] Invoice: Disturbing noise when w/ multiple articles of same type Message-ID: <20070508194133.GC17322@nibiru.local> Hi folks, why does it give this disturbing noise when putting multiple artiles of the same type on one invoice ? For services this is really ugly. Obviously you don't have an separate product for every little piece you've done for the customer. The article is simply working time, amount of "1" means 1 hour ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:48:03 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:48:03 +0200 Subject: [Vtigercrm-developers] Requesting trac access Message-ID: <20070508194803.GD17322@nibiru.local> Hi folks, as I'm currenly discovering lots of bugs, I'd like to get trac access to file them there. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:52:46 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:52:46 +0200 Subject: [Vtigercrm-developers] [BUG] cannot change my company name Message-ID: <20070508195245.GE17322@nibiru.local> Hi folks, I cannot change my company name. No matter what I do, it remains "vtiger". How can I get this fixed ASAP ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 13:25:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 22:25:20 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! Message-ID: <20070508202520.GF17322@nibiru.local> This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gharris at teamexpansion.org Tue May 8 13:41:06 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 16:41:06 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> Message-ID: Who in the world are you and why are you cursing all over the place!!!! Thanks, Greg Harris ---------- Original Message ---------- FROM: Enrico Weigelt TO: vtiger support DATE: Tue, 8 May 2007 22:25:20 +0200 SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From jorge.torres.maldonado at gmail.com Tue May 8 13:49:54 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 8 May 2007 16:49:54 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: References: <20070508202520.GF17322@nibiru.local> Message-ID: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Hi, I believe BUG reporting is very important, no matter who in planet one may be. Cheers, On 5/8/07, Greg Harris wrote: > > Who in the world are you and why are you cursing all over the place!!!! > > Thanks, > > Greg Harris > > > > ---------- Original Message ---------- > > FROM: Enrico Weigelt > TO: vtiger support > DATE: Tue, 8 May 2007 22:25:20 +0200 > > SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! > > > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/d8b9195b/attachment.htm From gharris at teamexpansion.org Tue May 8 14:13:00 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 17:13:00 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/a8cdeb4d/attachment.html From tzenk at gmx.net Tue May 8 15:40:10 2007 From: tzenk at gmx.net (Torsten Zenk) Date: Wed, 09 May 2007 00:40:10 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> References: <20070508202520.GF17322@nibiru.local> Message-ID: <4640FC4A.1050703@gmx.net> Yeah, Bug reporting in a neutral way is very important, but we don?t need any personal emotions in a bug report, so wether it is ...what the hell....or it is.....who are you...just report and keep your emotions for the forum and your wife ;) Torsten Enrico Weigelt schrieb: > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > From gopals at vtiger.com Tue May 8 19:20:11 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 09 May 2007 07:50:11 +0530 Subject: [Vtigercrm-developers] Requesting trac access In-Reply-To: <20070508194803.GD17322@nibiru.local> References: <20070508194803.GD17322@nibiru.local> Message-ID: <46412FDB.9080001@vtiger.com> Hi, I've enabled trac access for you. Shortly you will receive login details in a separate mail. URL: http://vtiger.fosslabs.com Regards, Gopal Enrico Weigelt wrote: > Hi folks, > > as I'm currenly discovering lots of bugs, I'd like to get trac > access to file them there. > > cu > From weigelt at metux.de Wed May 9 04:27:30 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:27:30 +0200 Subject: [Vtigercrm-developers] RFC: add function getCurrentOrgDetails() Message-ID: <20070509112730.GA16156@nibiru.local> Hi folks, there are several points where the information of the current organisation is retrieved on pedestrian ways (several SQL queries, object creations, etc). Such things are an good place for bugs, so we should reduce them as much as possible. So I suggest introducing an new function "getEntityOrgDetails()", which retrieves that information by the given $crmid. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 04:28:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:28:41 +0200 Subject: [Vtigercrm-developers] TeX printing Message-ID: <20070509112841.GB16156@nibiru.local> Hi folks, is anyone working on TeX based printing (ie. Invoices) ? Otherwise I'll take care of it. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 04:42:40 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:42:40 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org Message-ID: <20070509114240.GC16156@nibiru.local> Hi folks, could anyone please explain what the table vtiger_entity2org actually is for ? As far as I understood it, we map the entities (ie. users are entities ?) to the organisation. Now I wonder if an entity can be associated to more than one organisation. If not, it's trivial to move that information directly to the entity's record and skip (maybe drop) this table. BTW: AFAIK we use the org's *NAME* here, not the (numerical) ID or some unique ident. That's a really bad idea, ie. makes changing the org name very, very complicated. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 05:06:21 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:06:21 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509112841.GB16156@nibiru.local> References: <20070509112841.GB16156@nibiru.local> Message-ID: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> I was thinking more about a wiki style On 5/9/07, Enrico Weigelt wrote: > > > Hi folks, > > > is anyone working on TeX based printing (ie. Invoices) ? > Otherwise I'll take care of it. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/18ddd9ce/attachment.html From weigelt at metux.de Wed May 9 05:12:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 14:12:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> Message-ID: <20070509121210.GA28731@nibiru.local> * Jorge Torres schrieb: > I was thinking more about a wiki style How can it assist in rendering high quality preprints ? Is there any good rendering engine for this out there we can use ? The wiki syntax is good for easy editing of hypertext, but driving an print from db content is an completely different issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 05:49:32 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:49:32 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509121210.GA28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> Message-ID: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Enrico, You are right, latex is about high quality prints, still you have to make a document class for what you want and so on, and I dont know a way about extracting db content from latex, I thought that (extracting db contents) could be easier achieved in a wiki syntax way, and precisely because of wiki's "easy-fast editing" it would be perfect for end user applications. Also wiki to xml shouldn't be that complicated, having data in XML; a XSL template can be very simple to describe (much more easier than latex class), there are xsl "rendering" functions for php; the result of xsl(xml) could be html, so you can either send it to the web browser or you can "html to pdf" which is straight forward in php. What do you think? On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > I was thinking more about a wiki style > > How can it assist in rendering high quality preprints ? > Is there any good rendering engine for this out there we can use ? > > The wiki syntax is good for easy editing of hypertext, but driving > an print from db content is an completely different issue. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/85d38641/attachment.htm From jorge.torres.maldonado at gmail.com Wed May 9 06:00:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:00:24 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Message-ID: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Enrico, Wait, Now that I think about it, it would be easier to just have vtiger to outputs a printing configuration form in which one textarea has an xml data structure of information that wants to be printed (say "invoice"), then another textarea for your xsl. If so; the only thing one should do, is to describe a xsl template for that xml structure, save, and that's it, next time you want to print, what vtiger would do is to "render" that information, as explained in my last email. Cheers, Jorge On 5/9/07, Jorge Torres wrote: > > Enrico, > > You are right, latex is about high quality prints, still you have to make > a document class for what you want and so on, and I dont know a way about > extracting db content from latex, I thought that (extracting db contents) > could be easier achieved in a wiki syntax way, and precisely because of > wiki's "easy-fast editing" it would be perfect for end user applications. > Also wiki to xml shouldn't be that complicated, having data in XML; a XSL > template can be very simple to describe (much more easier than latex class), > there are xsl "rendering" functions for php; the result of xsl(xml) could be > html, so you can either send it to the web browser or you can "html to pdf" > which is straight forward in php. > > What do you think? > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > I was thinking more about a wiki style > > > > How can it assist in rendering high quality preprints ? > > Is there any good rendering engine for this out there we can use ? > > > > The wiki syntax is good for easy editing of hypertext, but driving > > an print from db content is an completely different issue. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/d40f8d56/attachment-0001.html From weigelt at metux.de Wed May 9 06:35:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:35:44 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <20070509133544.GC28731@nibiru.local> * Jorge Torres schrieb: Hi, > Wait, Now that I think about it, it would be easier to just > have vtiger to outputs a printing configuration form in which > one textarea has an xml data structure of information that > wants to be printed (say "invoice"), then another textarea > for your xsl. If so; the only thing one should do, is to > describe a xsl template for that xml structure, save, and > that's it, next time you want to print, what vtiger would > do is to "render" that information, as explained in my last email. Again, very complicated for user and coder. Why not just an option in the settings screen, where the user can select renderer and template, and maybe an additional template editing form ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 06:39:42 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 15:39:42 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509114240.GC16156@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 01:42:40PM +0200 References: <20070509114240.GC16156@nibiru.local> Message-ID: <20070509153942.B3824@Strawberry.COM> Hi, it can be assigned to more than one organization. There is a 'primary' column in the entity2org table which defines the primary organization - the one that really 'owns' the entity. Jens On Wed, May 09, 2007 at 01:42:40PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > could anyone please explain what the table vtiger_entity2org > actually is for ? > > As far as I understood it, we map the entities (ie. users are > entities ?) to the organisation. > > Now I wonder if an entity can be associated to more than one > organisation. If not, it's trivial to move that information > directly to the entity's record and skip (maybe drop) this table. > > > BTW: AFAIK we use the org's *NAME* here, not the (numerical) > ID or some unique ident. That's a really bad idea, ie. makes > changing the org name very, very complicated. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 06:44:00 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 15:44:00 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <4641D020.60605@tsolucio.com> Hi, Why not use the merge system that is already in vtiger? I have enhanced the merge system based on forum code and I have added merge to SO very easily. Now my client can create word, openoffice or RTF documents using their favorite document processor as if they made any other template. What advantage is there in TeX? Joe TSolucio Jorge Torres escribi?: > Enrico, From weigelt at metux.de Wed May 9 06:45:37 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:45:37 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509153942.B3824@Strawberry.COM> References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> Message-ID: <20070509134537.GD28731@nibiru.local> * Jens Hamisch schrieb: Hi, > it can be assigned to more than one organization. > There is a 'primary' column in the entity2org table which defines the > primary organization - the one that really 'owns' the entity. hmm, meanwhile I've found some pieces of code (in the invoice module) which explicitly break if the we have more than one org per entity (AFAIK). So what's correct now ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 06:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:47:48 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <20070509134748.GE28731@nibiru.local> * Joe Bordes schrieb: Hi, > Why not use the merge system that is already in vtiger? Well, actually, I never heared about that. > What advantage is there in TeX? High quality preprints ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 06:49:45 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:49:45 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Sounds great, but i dont get how is it that you get DB info from client's, word, openoffice. Thanks, Jorge On 5/9/07, Joe Bordes wrote: > > Hi, > > Why not use the merge system that is already in vtiger? > I have enhanced the merge system based on forum code and I have added > merge to SO very easily. Now my client can create word, openoffice or > RTF documents using their favorite document processor as if they made > any other template. > What advantage is there in TeX? > > Joe > TSolucio > > Jorge Torres escribi?: > > Enrico, > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/850e0d7c/attachment.htm From jens at Strawberry.COM Wed May 9 07:00:11 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 16:00:11 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509134537.GD28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 03:45:37PM +0200 References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> <20070509134537.GD28731@nibiru.local> Message-ID: <20070509160011.E3824@Strawberry.COM> Hi, do you have some more detailed information on that? Could be either a bug or something missed in the port of my changes to 5.0.3. Jens On Wed, May 09, 2007 at 03:45:37PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > it can be assigned to more than one organization. > > There is a 'primary' column in the entity2org table which defines the > > primary organization - the one that really 'owns' the entity. > > hmm, meanwhile I've found some pieces of code (in the invoice module) > which explicitly break if the we have more than one org per > entity (AFAIK). > > So what's correct now ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 07:02:21 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:02:21 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Message-ID: <20070509140221.GF28731@nibiru.local> * Jorge Torres schrieb: Hi, > Sounds great, but i dont get how is it that you get DB info > from client's, word, openoffice. Are we still talking about the same thing ? I'm working on invoice pdf rendering, which is entirely done on the server. Other formats, ie. OO could be generated the same way. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 07:16:48 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 10:16:48 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Enrico, Yes, from I want it to do it from server side. It seems that I don't get what this merge system does, I understood from Jen's suggestion: that users could work their templates at client side, is this correct?, if so, how would they get DB data or data content structure from clients editor. Rendering setup Option in settings screen as Enrico mentioned would be perfect. On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > Sounds great, but i dont get how is it that you get DB info > > from client's, word, openoffice. > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/c1f5479b/attachment.htm From weigelt at metux.de Wed May 9 07:23:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:23:28 +0200 Subject: [Vtigercrm-developers] organization ident Message-ID: <20070509142328.GH28731@nibiru.local> Hi folks, I've found an big-fat problem with the organization modeling in the DB: The org is always referenced by its name ! To be clear: its the *printable* name, which appears for example on the bill. So now it's clear, why it cannot be changed in the settings ;-O It appears the name is also abused as ident, which is the key problem. There's no additional ID here. To fix this, we have two options: a) Add an numerical ID to the organization table and fix all the schema to reference on that. This would probably be the most clean model, but requires much care on schema updates. b) Add an new text field (ie. "official_name") which now carries the actual *name* (ie. for printing on the invoice) and leave evrything else untouched. Nearly trivial to implement, but maybe not very clean design. Comments ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:33:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:33:35 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Message-ID: <20070509143335.GI28731@nibiru.local> * Jorge Torres schrieb: > if so, how would they get DB data or data content structure > from clients editor. Simply add some new button which calls the invoice rendering with an different engine / output format ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 07:59:10 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 16:59:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <4641E1BE.80207@tsolucio.com> Yes, we are still talking about the same thing. Please take a look at the existng merge system for accounts. The idea is that you open up OO and write the template, where you want the contact name (for example) you put CONTACT_NAME and this gets substituted dynamically when you choose the template and the contact. If we add this feature to invoice, you could write your invoice in word and use INVOICE_NUMBER or INVOICE_DATE for example. That is basically what I have working. Joe TSolucio Enrico Weigelt escribi?: > * Jorge Torres schrieb: > > Hi, > > >> Sounds great, but i dont get how is it that you get DB info >> from client's, word, openoffice. >> > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > From weigelt at metux.de Wed May 9 08:12:19 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:12:19 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641E1BE.80207@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> Message-ID: <20070509151219.GJ28731@nibiru.local> * Joe Bordes schrieb: Hi, > Please take a look at the existng merge system for accounts. Where is it ? > The idea is that you open up OO and write the template, where you want > the contact name (for example) you put CONTACT_NAME and this gets > substituted dynamically when you choose the template and the contact. > If we add this feature to invoice, you could write your invoice in word > and use INVOICE_NUMBER or INVOICE_DATE for example. Actually, I'm not interested in having to cope with blobs like OO, neither do I have anything to do w/ M$ crap. That's totally irrelevant to me. All I want is that the already existing pdf generation stuff produces an high quality pdf preprint for my bills - w/o requiring any manual intervention. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 08:15:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 17:15:35 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509142328.GH28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 04:23:28PM +0200 References: <20070509142328.GH28731@nibiru.local> Message-ID: <20070509171535.F3824@Strawberry.COM> Hi, or opportunity c) handle organization and orgunit as yet another CRMEntities would be the best fit into the internal vtiger design for my point of view. The effort would be even more than just introducing an orgid (code-changes and cleanups), but from the maintainability point of view it would be a clear and straight forward solution. Jens On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I've found an big-fat problem with the organization modeling in > the DB: > > The org is always referenced by its name ! > To be clear: its the *printable* name, which appears for example > on the bill. > > So now it's clear, why it cannot be changed in the settings ;-O > > It appears the name is also abused as ident, which is the key > problem. There's no additional ID here. > > To fix this, we have two options: > > a) Add an numerical ID to the organization table and fix all the > schema to reference on that. This would probably be the most > clean model, but requires much care on schema updates. > > b) Add an new text field (ie. "official_name") which now carries > the actual *name* (ie. for printing on the invoice) and leave > evrything else untouched. Nearly trivial to implement, but maybe > not very clean design. > > > > Comments ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 08:26:50 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:26:50 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <4641E83A.2030603@tsolucio.com> Very good idea!! Joe TSolucio Jens Hamisch escribi?: > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities > > > would be the best fit into the internal vtiger design for my > point of view. > > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. > > > Jens > > > > On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > >> Hi folks, >> >> >> I've found an big-fat problem with the organization modeling in >> the DB: >> >> The org is always referenced by its name ! >> To be clear: its the *printable* name, which appears for example >> on the bill. >> >> So now it's clear, why it cannot be changed in the settings ;-O >> >> It appears the name is also abused as ident, which is the key >> problem. There's no additional ID here. >> >> To fix this, we have two options: >> >> a) Add an numerical ID to the organization table and fix all the >> schema to reference on that. This would probably be the most >> clean model, but requires much care on schema updates. >> >> b) Add an new text field (ie. "official_name") which now carries >> the actual *name* (ie. for printing on the invoice) and leave >> evrything else untouched. Nearly trivial to implement, but maybe >> not very clean design. >> >> >> >> Comments ? >> >> cu >> -- >> --------------------------------------------------------------------- >> Enrico Weigelt == metux IT service >> >> phone: +49 36207 519931 www: http://www.metux.de/ >> fax: +49 36207 519932 email: contact at metux.de >> cellphone: +49 174 7066481 >> --------------------------------------------------------------------- >> -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- >> --------------------------------------------------------------------- >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > From jorge.torres.maldonado at gmail.com Wed May 9 08:28:10 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 11:28:10 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509151219.GJ28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> Message-ID: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Hi, I don't see why having other formats output support would be a problem, Jen's idea of having templates done in OO or others, is great; simply make your template on whatever editor you prefer, M$, OO, vi. upload and next time you generate invoices, buy orders, or as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, but I certainly want to see Jens work, where can I get it? Thanks, Jorge On 5/9/07, Enrico Weigelt wrote: > > * Joe Bordes schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the contact. > > If we add this feature to invoice, you could write your invoice in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/8a056c99/attachment.html From weigelt at metux.de Wed May 9 08:27:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:27:49 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <20070509152749.GK28731@nibiru.local> * Jens Hamisch schrieb: > > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities What does that exactly mean ? Schema change necessary for that ? > would be the best fit into the internal vtiger design for my > point of view. ACK. > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. ACK. So: what has to be done for that ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 08:39:01 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:39:01 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <4641EB15.70205@tsolucio.com> http://forums.vtiger.com/viewtopic.php?t=14501 Jorge Torres escribi?: > Hi, > > I don't see why having other formats output support would be a > problem, Jen's idea of having templates done in OO or others, is > great; simply make your template on whatever editor you prefer, M$, > OO, vi. upload and next time you generate invoices, buy orders, or > as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont > know if those are Jen's plans, but I certainly want to see Jens > work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, *Enrico Weigelt* > wrote: > > * Joe Bordes > schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where > you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the > contact. > > If we add this feature to invoice, you could write your invoice > in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From jens at Strawberry.COM Wed May 9 09:02:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:02:37 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com>; from Jorge Torres on Wed, May 09, 2007 at 11:28:10AM -0400 References: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <20070509180237.G3824@Strawberry.COM> Hi, I'd prefer a solution that is more generic. The thing I'm not happy about is to introduce another dependency into vtiger. However if it becomes necessary, than I'd suggest to focus on more actual products than latex. OpenOffice and StarOffice both support the open document standard. I don't know if M$ will support it some day, too, but the office suites mentioned above both run on all operation systems. Finally those who just want to read and print an invoice may do not have to install the entire office suite. They may use the document viewers available. There's another thing I'm missing in vtiger: document management. vtiger's slogan is to reflect an entire customer life cycle. Today we have campains, quotes, sales-order and invoices. There are open issues like contracts and statements that are missing. But this is just a more or less 'technical' point of view. What about all the letters written to (and received from) a customer. This is also part of the life-cycle and therefor should be managed by vtiger. Thus: what we need is an interface to the office suites. And the logical consequence would be: All documents produced by vtiger should be based on the same standard as the documents managed by vtiger. Than it would be easy to manage self-produced documents as any other documents, too. My conclusion: Use the open document standard instead of latex. Jens On Wed, May 09, 2007 at 11:28:10AM -0400, Jorge Torres wrote: > Hi, > > I don't see why having other formats output support would be a problem, > Jen's idea of having templates done in OO or others, is great; simply make > your template on whatever editor you prefer, M$, OO, vi. upload and next > time you generate invoices, buy orders, or as the case might be, you > have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, > but I certainly want to see Jens work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Joe Bordes schrieb: > > > > Hi, > > > > > Please take a look at the existng merge system for accounts. > > > > Where is it ? > > > > > The idea is that you open up OO and write the template, where you want > > > the contact name (for example) you put CONTACT_NAME and this gets > > > substituted dynamically when you choose the template and the contact. > > > If we add this feature to invoice, you could write your invoice in word > > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > > > Actually, I'm not interested in having to cope with blobs like OO, > > neither do I have anything to do w/ M$ crap. That's totally > > irrelevant to me. > > > > All I want is that the already existing pdf generation stuff > > produces an high quality pdf preprint for my bills - w/o requiring > > any manual intervention. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 9 09:06:40 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:06:40 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509152749.GK28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 05:27:49PM +0200 References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> <20070509152749.GK28731@nibiru.local> Message-ID: <20070509180640.H3824@Strawberry.COM> Hi, regarding the schema: just introduce an organization ID and add a constraint to the CRMEntity table. (IMHO orgunit already has an orgunitid - w/o looking at the code). code changes are more complex: Mainly the Save methods have to be reviewed whether they may be reduced to the super class methods. Jens On Wed, May 09, 2007 at 05:27:49PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > > > Hi, > > > > > > or opportunity > > > > c) handle organization and orgunit as yet another CRMEntities > > What does that exactly mean ? > Schema change necessary for that ? > > > would be the best fit into the internal vtiger design for my > > point of view. > > ACK. > > > The effort would be even more than just introducing an orgid > > (code-changes and cleanups), but from the maintainability point > > of view it would be a clear and straight forward solution. > > ACK. > > So: what has to be done for that ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 11:57:58 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 20:57:58 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509180237.G3824@Strawberry.COM> References: <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> Message-ID: <20070509185758.GM28731@nibiru.local> * Jens Hamisch schrieb: Hi, > I'd prefer a solution that is more generic. well, my approach is quite generic ;-p > The thing I'm not happy about is to introduce another > dependency into vtiger. Fearing dependencies is what makes projects really fat and unmaintainable. Mozilla is an good (bad) example for that ;P BTW: you don't need to have (la)tex. You can use some other renderer (ie. fpdf-based, plain html, ...) > However if it becomes necessary, than I'd suggest to focus > on more actual products than latex. Yes, Latex is quite old, but it's also quite, quite stable. Coding activity is no appropriate indicator on quality. > OpenOffice and StarOffice both support the open document standard. Nice. Do you expect me to have that blod installed+running just to get an pdf bill ? > I don't know if M$ will support it some day, too, but the office > suites mentioned above both run on all operation systems. Finally > those who just want to read and print an invoice may do not have > to install the entire office suite. They may use the document > viewers available. I do *not* want any bit in some $office_format. I just want to have my bills as pdf w/ *my* custom layout. Latex is an very proven approach. > There's another thing I'm missing in vtiger: document management. Ugh, that's another story ... > And the logical consequence would be: All documents produced by > vtiger should be based on the same standard as the documents managed > by vtiger. Than it would be easy to manage self-produced documents > as any other documents, too. Interface != Storage/Encoding/Format. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From javawaba at hotmail.com Wed May 9 17:14:27 2007 From: javawaba at hotmail.com (Jim Weir) Date: Wed, 09 May 2007 20:14:27 -0400 Subject: [Vtigercrm-developers] ?? Message-ID: how do I unsubscribe from this list? _________________________________________________________________ Catch suspicious messages before you open them—with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 From brett.hooker at roarz.com Wed May 9 20:24:05 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 10 May 2007 13:24:05 +1000 Subject: [Vtigercrm-developers] VT5 Outlook Plugin Development Questions Message-ID: <46429055.4080208@roarz.com> Team, Which version of VB is used to develop/maintain the VT5 Outlook Plugin? Is there wiki/starter on contributing to the VT5 Outlook Plugin? Thanks, Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/4d8fcdbc/attachment.html From gopals at vtiger.com Wed May 9 21:48:25 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 10 May 2007 10:18:25 +0530 Subject: [Vtigercrm-developers] ?? In-Reply-To: References: Message-ID: <4642A419.3010003@vtiger.com> Hi, You can unsubscribe from the developer list at: http://lists.vtigercrm.com/mailman/listinfo/vtigercrm-developers Thanks, Gopal Jim Weir wrote: > how do I unsubscribe from this list? > > _________________________________________________________________ > Catch suspicious messages before you open them---with Windows Live > Hotmail. > http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/598fe713/attachment.htm From jens at Strawberry.COM Thu May 10 00:37:41 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 10 May 2007 09:37:41 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509185758.GM28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 08:57:58PM +0200 References: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> <20070509185758.GM28731@nibiru.local> Message-ID: <20070510093741.B7494@Strawberry.COM> Hi, > I do *not* want any bit in some $office_format. I just want to > have my bills as pdf w/ *my* custom layout. Latex is an very > proven approach. let's get back to the generic solution: (la)tex is not standard on Unix platforms, but (g|t|n)roff and tbl is! Those provide enough features to produce high quality formulars. And they do not intro- duce another prerequisite. I havn't had a look at what finally came into the 5.0.3 branch. But I already introduced different pdf templates for all organizations and orgunits ... > > There's another thing I'm missing in vtiger: document management. > > Ugh, that's another story ... > > > And the logical consequence would be: All documents produced by > > vtiger should be based on the same standard as the documents managed > > by vtiger. Than it would be easy to manage self-produced documents > > as any other documents, too. > > Interface != Storage/Encoding/Format. Agree. A document management should be capable of handling any format of a document, so Office docs, scans and also latex would not contradict to the document management approach. However, to get more things covered office would be the first choice, because to create letters out of a vtiger attached document management, we need an interface to the office suite (which of course could be simply the creation of a base document that becomes opened). Having this interface, we have evverything at hand to simply create any formular w/o interfacing to yet another monstrum of third party software (which latex definitely is!). Also the latex approach is even more complex, because the templates themselfes prerequisite according latex extensions to be installed (at least may!). In comparison the office suites are monolithic and therefor complete. And finally: latex was and will be forever a system used by some experts. It is not addressed to people thout programming skills. I'm afraid it will not be possible to hand over the template definition to one of your sales and marketing people if it is based on latex. Office keeps this door open ... Jens -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From kenlyle at yahoo.com Thu May 10 07:12:38 2007 From: kenlyle at yahoo.com (Ken Lyle) Date: Thu, 10 May 2007 07:12:38 -0700 (PDT) Subject: [Vtigercrm-developers] Document Management In-Reply-To: Message-ID: <448400.55472.qm@web36405.mail.mud.yahoo.com> I have attended a few webinars from Alfresco, and they seem to have a good open source document management and web content management system. I have the impression that they are very standards compliant, like WebDAV, and something that makes their repository show up as a shared drive, and have some cool toys like rules that do automatic format conversions, say of each .doc to a PDF for the archive version. It seems like it should be only a 'loose dependency', which might make everyone happy. And, for the merging itself, maybe can use GoogleApps, or ThinkFree, or one of the free web suites that will save to .doc, .pdf, etc. That seems like a dependency that actually liberates the developers, the users, and their IT staffs from deploying software. Maybe you wizards can run with one of these ideas... Ken Think bigger than 'left' vs. 'right'- basic freedoms are under attack- http://www.healthfreedomusa.org/index.php/?cat=2 From weigelt at metux.de Thu May 10 08:19:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:19:20 +0200 Subject: [Vtigercrm-developers] [PATCH] 5.1_jens vs. jens' private Message-ID: <20070510151920.GA25395@nibiru.local> Hi folks, here's a bunch of patches between the 5.1_jens branch and jens's private tree, cleaned up a little bit. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/database/Postgres8.php htdocs/include/database/Postgres8.php --- orig/include/database/Postgres8.php 2007-05-04 16:11:49.000000000 +0200 +++ htdocs/include/database/Postgres8.php 2007-05-07 14:23:49.000000000 +0200 @@ -1,144 +1,144 @@ -info( "fixPostgresQuery: ".$query); - - // If we already have an order or group cluase separate ist for later use - if( strpos($queryRecord,'GROUP') > 0) - { - $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); - if( strpos($groupClause,'ORDER') > 0) - { - $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); - $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); - } - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); - } - - if( strpos($queryRecord,'ORDER') > 0) - { - $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); - } - - // Construkt the privateGroupList from the filed list by separating combined - // record.field entries - $privateGroupList = array(); - $token = strtok( $queryFields, ", () "); - while( $token !== false) { - if( strpos( $token, ".") !== false) { - array_push( $privateGroupList, $token); - } - $token = strtok( ", () "); - } - sort( $privateGroupList); - $groupFields = ""; - $last = ""; - for( $i = 0; $i < count($privateGroupList); $i++) { - if( $last != $privateGroupList[$i]) { - if( $groupFields == "") - $groupFields = $privateGroupList[$i]; - else - $groupFields .= ",".$privateGroupList[$i]; - } - $last = $privateGroupList[$i]; - } - - // Rebuild the query - $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; - if( $groupClause != "" ) - $groupClause = $groupClause.",".$groupFields; - else - $groupClause = $groupFields; - $query .= expandStar($groupClause,$log)." ".$orderClause; - - if( $debug) - $log->info( "fixPostgresQuery result: ".$query); - - return( $query); -} - -// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause -function expandStar($fieldlist,$log) -{ - $expanded=""; - $field = strtok( $fieldlist, ","); - while( $field != "") - { - //remove leading and trailing spaces - $field = trim( $field); - - //still spaces in the field indicate a complex structure - if( strpos( $field, " ") == 0) - { - - //locate table- and fieldname - $pos = strpos( $field, "."); - if( $pos > 0) - { - $table = substr( $field, 0, $pos); - $subfield = substr( $field, $pos+1, strlen($field)-$pos); - - //do we need to expand? - if( $subfield == "*") - $field = expandRecord($table,$log); - } - - //add the propably expanded field to the querylist - if( $expanded == "") - $expanded = $field; - else - $expanded .= ",".$field; - } - - //next field - $field = strtok(","); - } - - //return the expanded fieldlist - return( $expanded); -} - -//return an expanded table field list -function expandRecord($table,$log) -{ +info( "fixPostgresQuery: ".$query); + + // If we already have an order or group cluase separate ist for later use + if( strpos($queryRecord,'GROUP') > 0) + { + $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); + if( strpos($groupClause,'ORDER') > 0) + { + $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); + $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); + } + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); + } + + if( strpos($queryRecord,'ORDER') > 0) + { + $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); + } + + // Construkt the privateGroupList from the filed list by separating combined + // record.field entries + $privateGroupList = array(); + $token = strtok( $queryFields, ", () "); + while( $token !== false) { + if( strpos( $token, ".") !== false) { + array_push( $privateGroupList, $token); + } + $token = strtok( ", () "); + } + sort( $privateGroupList); + $groupFields = ""; + $last = ""; + for( $i = 0; $i < count($privateGroupList); $i++) { + if( $last != $privateGroupList[$i]) { + if( $groupFields == "") + $groupFields = $privateGroupList[$i]; + else + $groupFields .= ",".$privateGroupList[$i]; + } + $last = $privateGroupList[$i]; + } + + // Rebuild the query + $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; + if( $groupClause != "" ) + $groupClause = $groupClause.",".$groupFields; + else + $groupClause = $groupFields; + $query .= expandStar($groupClause,$log)." ".$orderClause; + + if( $debug) + $log->info( "fixPostgresQuery result: ".$query); + + return( $query); +} + +// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause +function expandStar($fieldlist,$log) +{ + $expanded=""; + $field = strtok( $fieldlist, ","); + while( $field != "") + { + //remove leading and trailing spaces + $field = trim( $field); + + //still spaces in the field indicate a complex structure + if( strpos( $field, " ") == 0) + { + + //locate table- and fieldname + $pos = strpos( $field, "."); + if( $pos > 0) + { + $table = substr( $field, 0, $pos); + $subfield = substr( $field, $pos+1, strlen($field)-$pos); + + //do we need to expand? + if( $subfield == "*") + $field = expandRecord($table,$log); + } + + //add the propably expanded field to the querylist + if( $expanded == "") + $expanded = $field; + else + $expanded .= ",".$field; + } + + //next field + $field = strtok(","); + } + + //return the expanded fieldlist + return( $expanded); +} + +//return an expanded table field list +function expandRecord($table,$log) +{ global $adb; $result = ""; $subfields = $adb->getColumnNames($table); - - //construct an entity string - for( $i=0; $i 0) - $result = substr( $result, 0, strlen( $result) -1); - - //return out new string - return( $result); -} -?> + + //construct an entity string + for( $i=0; $i 0) + $result = substr( $result, 0, strlen( $result) -1); + + //return out new string + return( $result); +} +?> -------------- next part -------------- diff -ruN orig/data/SugarBean.php htdocs/data/SugarBean.php --- orig/data/SugarBean.php 2007-05-04 16:11:47.000000000 +0200 +++ htdocs/data/SugarBean.php 2007-05-07 14:40:44.000000000 +0200 @@ -1,451 +1,451 @@ -id) || $this->id == "") - { - $isUpdate = false; - } - - if ( $this->new_with_id == true ) - { - $isUpdate = false; - } - - //$this->date_modified = $this->db->formatDate(date('YmdHis')); - $this->date_modified = date('YmdHis'); - if (isset($current_user)) $this->modified_user_id = $current_user->id; - - if($isUpdate) - { - $query = "Update ".$this->table_name." set "; - } - else - { - //$this->date_entered = $this->db->formatDate(date('YmdHis')); - $this->date_entered = date('YmdHis'); - - if($this->new_schema && - $this->new_with_id == false) - { - $this->id = $this->db->getUniqueID("vtiger_users"); - } - - $query = "INSERT into ".$this->table_name; - } - // todo - add date modified to the list. - - // write out the SQL statement. - //$query .= $this->table_name." set "; - - $firstPass = 0; - $insKeys = '('; - $insValues = '('; - $updKeyValues=''; - foreach($this->column_fields as $field) - { - // Do not write out the id vtiger_field on the update statement. - // We are not allowed to change ids. - if($isUpdate && ('id' == $field)) - continue; - - // Only assign variables that have been set. - if(isset($this->$field)) - { - // Try comparing this element with the head element. - if(0 == $firstPass) - { - $firstPass = 1; - } - else - { - if($isUpdate) - { - $updKeyValues = $updKeyValues.", "; - } - else - { - $insKeys = $insKeys.", "; - $insValues = $insValues.", "; - } - } - /*else - $query = $query.", "; - - $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; - */ - if($isUpdate) - { - $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - else - { - $insKeys = $insKeys.$field; - $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - } - } - - if($isUpdate) - { - $query = $query.$updKeyValues." WHERE ID = '$this->id'"; - $this->log->info("Update $this->object_name: ".$query); - } - else - { - $query = $query.$insKeys.") VALUES ".$insValues.")"; - $this->log->info("Insert: ".$query); - } - - $this->db->query($query, true); - - // If this is not an update then store the id for later. - if(!$isUpdate && !$this->new_schema && !$this->new_with_id) - { - $this->db->println("Illegal Access - SugarBean"); - //this is mysql specific - $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); - } - - return $this->id; - } - - - /** - * This function retrieves a record of the appropriate type from the DB. - * It fills in all of the vtiger_fields from the DB into the object it was called on. - * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. - * returns this - The object that it was called apon or null if exactly 1 record was not found. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - function retrieve($id = -1, $encodeThis=true) { - if ($id == -1) { - $id = $this->id; - } - if($id == '') { - return null; - } -// GS porting vtiger_crmentity -$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; -// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; - $this->log->debug("Retrieve $this->object_name: ".$query); - - $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); - - if(empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result, -1, $encodeThis); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - */ - - function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { - $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); - - $query = $this->create_list_query($order_by, $where); - - return $this->process_list_query($query, $row_offset, $limit, $max); - } - - /** - * This function returns a full (ie non-paged) list of the current object type. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function get_full_list($order_by = "", $where = "") { - $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - $result =& $this->db->query($query, false); - - if($this->db->getRowCount($result) > 0){ - - // We have some data. - while ($row = $this->db->fetchByAssoc($result)) { - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else { - $this->$field = ''; - } - } - - - $list[] = clone($this); //added clone tosupport PHP5 - } - } - - if (isset($list)) return $list; - else return null; - - } - - function create_list_query($order_by, $where) - { - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - return $query; - } - - - function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) - { - global $list_max_entries_per_page; - $this->log->debug("process_list_query: ".$query); - if(!empty($limit) && $limit != -1){ - $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); - }else{ - $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); - } - - $list = Array(); - if($max_per_page == -1){ - $max_per_page = $list_max_entries_per_page; - } - $rows_found = $this->db->getRowCount($result); - - $this->log->debug("Found $rows_found ".$this->object_name."s"); - - $previous_offset = $row_offset - $max_per_page; - $next_offset = $row_offset + $max_per_page; - - if($rows_found != 0) - { - - // We have some data. - - for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - - $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else - { - $this->$field = ""; - } - } - - - $list[] = clone($this); //added clone to support PHP5 - } - } - - $response = Array(); - $response['list'] = $list; - $response['row_count'] = $rows_found; - $response['next_offset'] = $next_offset; - $response['previous_offset'] = $previous_offset; - - return $response; - } - - - /** - * Track the viewing of a detail record. This leverages get_summary_text() which is object specific - * params $user_id - The user that is viewing the record. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function track_view($user_id, $current_module,$id='') - { - $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); - - $tracker = new Tracker(); - $tracker->track_view($user_id, $current_module, $id, ''); - } - - - /** This function should be overridden in each module. It marks an item as deleted. - * If it is not overridden, then marking this type of item is not allowed - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function mark_deleted($id) - { - $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; - $this->db->query($query, true,"Error marking record deleted: "); - - $this->mark_relationships_deleted($id); - - // Take the item off of the recently viewed lists. - $tracker = new Tracker(); - $tracker->delete_item_history($id); - - } - - - /* This is to allow subclasses to fill in row specific columns of a list view form - function list_view_parse_additional_sections(&$list_form) - { - } - */ - /* This function assigns all of the values into the template for the list view - function get_list_view_array(){ - $return_array = Array(); - - foreach($this->list_fields as $field) - { - $return_array[strtoupper($field)] = $this->$field; - } - - return $return_array; - } - function get_list_view_data() - { - - return $this->get_list_view_array(); - } - - function get_where(&$fields_array) - { - $where_clause = "WHERE "; - $first = 1; - foreach ($fields_array as $name=>$value) - { - if ($first) - { - $first = 0; - } - else - { - $where_clause .= " AND "; - } - - $where_clause .= "$name = ".$adb->quote($value).""; - } - - $where_clause .= " AND deleted=0"; - return $where_clause; - } - - - function retrieve_by_string_fields($fields_array, $encode=true) - { - $where_clause = $this->get_where($fields_array); - - $query = "SELECT * FROM $this->table_name $where_clause"; - $this->log->debug("Retrieve $this->object_name: ".$query); - $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); - if( empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result,-1, $encode); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - - // this method is called during an import before inserting a bean - // define an associative array called $special_fields - // the keys are user defined, and don't directly map to the bean's vtiger_fields - // the value is the method name within that bean that will do extra - // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' - - function process_special_fields() - { - foreach ($this->special_functions as $func_name) - { - if ( method_exists($this,$func_name) ) - { - $this->$func_name(); - } - } - } - - */ -} - - -?> +id) || $this->id == "") + { + $isUpdate = false; + } + + if ( $this->new_with_id == true ) + { + $isUpdate = false; + } + + //$this->date_modified = $this->db->formatDate(date('YmdHis')); + $this->date_modified = date('YmdHis'); + if (isset($current_user)) $this->modified_user_id = $current_user->id; + + if($isUpdate) + { + $query = "Update ".$this->table_name." set "; + } + else + { + //$this->date_entered = $this->db->formatDate(date('YmdHis')); + $this->date_entered = date('YmdHis'); + + if($this->new_schema && + $this->new_with_id == false) + { + $this->id = $this->db->getUniqueID("vtiger_users"); + } + + $query = "INSERT into ".$this->table_name; + } + // todo - add date modified to the list. + + // write out the SQL statement. + //$query .= $this->table_name." set "; + + $firstPass = 0; + $insKeys = '('; + $insValues = '('; + $updKeyValues=''; + foreach($this->column_fields as $field) + { + // Do not write out the id vtiger_field on the update statement. + // We are not allowed to change ids. + if($isUpdate && ('id' == $field)) + continue; + + // Only assign variables that have been set. + if(isset($this->$field)) + { + // Try comparing this element with the head element. + if(0 == $firstPass) + { + $firstPass = 1; + } + else + { + if($isUpdate) + { + $updKeyValues = $updKeyValues.", "; + } + else + { + $insKeys = $insKeys.", "; + $insValues = $insValues.", "; + } + } + /*else + $query = $query.", "; + + $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; + */ + if($isUpdate) + { + $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + else + { + $insKeys = $insKeys.$field; + $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + } + } + + if($isUpdate) + { + $query = $query.$updKeyValues." WHERE ID = '$this->id'"; + $this->log->info("Update $this->object_name: ".$query); + } + else + { + $query = $query.$insKeys.") VALUES ".$insValues.")"; + $this->log->info("Insert: ".$query); + } + + $this->db->query($query, true); + + // If this is not an update then store the id for later. + if(!$isUpdate && !$this->new_schema && !$this->new_with_id) + { + $this->db->println("Illegal Access - SugarBean"); + //this is mysql specific + $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); + } + + return $this->id; + } + + + /** + * This function retrieves a record of the appropriate type from the DB. + * It fills in all of the vtiger_fields from the DB into the object it was called on. + * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. + * returns this - The object that it was called apon or null if exactly 1 record was not found. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + function retrieve($id = -1, $encodeThis=true) { + if ($id == -1) { + $id = $this->id; + } + if($id == '') { + return null; + } +// GS porting vtiger_crmentity +$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; +// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; + $this->log->debug("Retrieve $this->object_name: ".$query); + + $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); + + if(empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result, -1, $encodeThis); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + */ + + function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { + $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); + + $query = $this->create_list_query($order_by, $where); + + return $this->process_list_query($query, $row_offset, $limit, $max); + } + + /** + * This function returns a full (ie non-paged) list of the current object type. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_full_list($order_by = "", $where = "") { + $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + $result =& $this->db->query($query, false); + + if($this->db->getRowCount($result) > 0){ + + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else { + $this->$field = ''; + } + } + + + $list[] = clone($this); //added clone tosupport PHP5 + } + } + + if (isset($list)) return $list; + else return null; + + } + + function create_list_query($order_by, $where) + { + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + return $query; + } + + + function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) + { + global $list_max_entries_per_page; + $this->log->debug("process_list_query: ".$query); + if(!empty($limit) && $limit != -1){ + $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); + }else{ + $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); + } + + $list = Array(); + if($max_per_page == -1){ + $max_per_page = $list_max_entries_per_page; + } + $rows_found = $this->db->getRowCount($result); + + $this->log->debug("Found $rows_found ".$this->object_name."s"); + + $previous_offset = $row_offset - $max_per_page; + $next_offset = $row_offset + $max_per_page; + + if($rows_found != 0) + { + + // We have some data. + + for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + + $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else + { + $this->$field = ""; + } + } + + + $list[] = clone($this); //added clone to support PHP5 + } + } + + $response = Array(); + $response['list'] = $list; + $response['row_count'] = $rows_found; + $response['next_offset'] = $next_offset; + $response['previous_offset'] = $previous_offset; + + return $response; + } + + + /** + * Track the viewing of a detail record. This leverages get_summary_text() which is object specific + * params $user_id - The user that is viewing the record. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function track_view($user_id, $current_module,$id='') + { + $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); + + $tracker = new Tracker(); + $tracker->track_view($user_id, $current_module, $id, ''); + } + + + /** This function should be overridden in each module. It marks an item as deleted. + * If it is not overridden, then marking this type of item is not allowed + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function mark_deleted($id) + { + $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; + $this->db->query($query, true,"Error marking record deleted: "); + + $this->mark_relationships_deleted($id); + + // Take the item off of the recently viewed lists. + $tracker = new Tracker(); + $tracker->delete_item_history($id); + + } + + + /* This is to allow subclasses to fill in row specific columns of a list view form + function list_view_parse_additional_sections(&$list_form) + { + } + */ + /* This function assigns all of the values into the template for the list view + function get_list_view_array(){ + $return_array = Array(); + + foreach($this->list_fields as $field) + { + $return_array[strtoupper($field)] = $this->$field; + } + + return $return_array; + } + function get_list_view_data() + { + + return $this->get_list_view_array(); + } + + function get_where(&$fields_array) + { + $where_clause = "WHERE "; + $first = 1; + foreach ($fields_array as $name=>$value) + { + if ($first) + { + $first = 0; + } + else + { + $where_clause .= " AND "; + } + + $where_clause .= "$name = ".$adb->quote($value).""; + } + + $where_clause .= " AND deleted=0"; + return $where_clause; + } + + + function retrieve_by_string_fields($fields_array, $encode=true) + { + $where_clause = $this->get_where($fields_array); + + $query = "SELECT * FROM $this->table_name $where_clause"; + $this->log->debug("Retrieve $this->object_name: ".$query); + $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); + if( empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result,-1, $encode); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + + // this method is called during an import before inserting a bean + // define an associative array called $special_fields + // the keys are user defined, and don't directly map to the bean's vtiger_fields + // the value is the method name within that bean that will do extra + // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' + + function process_special_fields() + { + foreach ($this->special_functions as $func_name) + { + if ( method_exists($this,$func_name) ) + { + $this->$func_name(); + } + } + } + + */ +} + + +?> -------------- next part -------------- diff -ruN orig/include/utils/EditViewUtils.php htdocs/include/utils/EditViewUtils.php --- orig/include/utils/EditViewUtils.php 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/utils/EditViewUtils.php 2007-05-07 14:45:15.000000000 +0200 @@ -157,7 +157,7 @@ } $fieldvalue [] = $options; } - elseif($uitype == 17) + elseif($uitype == 17 || $uitype == 18) { $editview_label[]=$mod_strings[$fieldlabel]; $fieldvalue [] = $value; @@ -1194,6 +1194,11 @@ $fieldvalue[] = $value; } + // For inheritance + if ( in_array($uitype,array(3,4,18,31,32)) ) { + $fieldvalue[] = $col_fields[$fieldname."@##@"]; + } + // Mike Crowe Mod --------------------------------------------------------force numerics right justified. if ( !eregi("id=",$custfld) ) $custfld = preg_replace("/debug("Exiting getOutputHtml method ..."); return $final_arr; } @@ -1883,4 +1889,104 @@ } +/** This function returns the detailed list of organization units associated to +* the selected organization +* Param $organization - organization object +*/ + +function getOrgUnits($organization,$orgunitid="") +{ + // The array we're about to build + $orgunittab = array(); + $fields = "orgunitid,type,name,address,city,state,country,code,phone,fax,website"; + $fields .= ",logoname,quote_template,so_template,po_template,invoice_template"; + global $adb; + + // Parameter check + if( !isset( $organization) || $organization == '' || + !isset( $organization->id) || $organization->id == '') + return $orgunittab; + + // Database query + if( $orgunitid != "0") + $query = "SELECT vtiger_orgunit.orgunitid AS orgunitid,"; + else + $query = "SELECT 0 AS orgunitid,"; + + // logoname is only defined in the organization record. + $query .= "'@##@' AS logoname, vtiger_organizationdetails.logoname AS org_logoname"; + + foreach( split( ',', $fields) as $field) { + if( $field != "orgunitid" && $field != "logoname") { + if( $orgunitid != "0") + $query .= ",vtiger_orgunit.".$field." AS ".$field; + else + $query .= ",NULL AS ".$field; + if( $field != "type" && $field != "name") + $query .= ",vtiger_organizationdetails.".$field." AS org_".$field; + } + } + + if( $orgunitid != "0" ) { + // database joins + $query .= " FROM vtiger_orgunit + LEFT JOIN vtiger_organizationdetails + ON vtiger_orgunit.organizationname=vtiger_organizationdetails.organizationname "; + + // single or list query? + if( $orgunitid == "") + $query .= "WHERE vtiger_orgunit.organizationname='".$organization->id."' "; + else + $query .= "WHERE vtiger_orgunit.orgunitid=".$orgunitid." "; + + // do not return deleted orgunits + $query .= "AND vtiger_orgunit.deleted=0"; + } + + else { + $query .= " FROM vtiger_organizationdetails "; + $query .= " WHERE vtiger_organizationdetails.organizationname='".$organization->id."' "; + } + + // Do not return deleted organizations + $query .= " AND vtiger_organizationdetails.deleted=0"; + + $result = $adb->query( $query); + $noofrows = $adb->num_rows($result); + + // Get all rows from database + for($j = 0; $j < $noofrows; $j++) { + $orgunit = array(); + foreach( split( ',', $fields) as $field) { + if( $orgunitid != "0") { + $orgunit[$field] = $adb->query_result($result,$j,$field); + + // Inherited and extended fields + if( substr( $orgunit[$field], 0, 4) == "@##@") { + if( $field == "name") { + $orgunit[$field] = substr($orgunit[$field], 4, strlen( $orgunit[$field])-4); + if( $orgunitid != "") + $orgunit[$field] = $organization->id." ".$orgunit[$field]; + } else { + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + } + + // no orgunit selected + else { + if( $field == "name") + $orgunit[$field] = $organization->id; + elseif( $field == "orgunitid") + $orgunit[$field] = 0; + else + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + $id = $orgunit["orgunitid"]; + $orgunittab[$id] = $orgunit; + } + // Return what we've found + return $orgunittab; +} ?> -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 14:52:56.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-04 15:04:43.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Accounts/Delete.php htdocs/modules/Accounts/Delete.php --- orig/modules/Accounts/Delete.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/Delete.php 2007-05-07 17:04:15.000000000 +0200 @@ -1,37 +1,37 @@ - + -------------- next part -------------- diff -ruN orig/modules/Accounts/DetailViewAjax.php htdocs/modules/Accounts/DetailViewAjax.php --- orig/modules/Accounts/DetailViewAjax.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/DetailViewAjax.php 2007-05-07 17:09:50.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Accounts"); - $acntObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving - { - $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $acntObj->id = $crmid; - $acntObj->mode = "edit"; - $acntObj->save("Accounts"); - if($acntObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Accounts"); + $acntObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving + { + $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $acntObj->id = $crmid; + $acntObj->mode = "edit"; + $acntObj->save("Accounts"); + if($acntObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN orig/Smarty/templates/RelatedLists.tpl htdocs/Smarty/templates/RelatedLists.tpl --- orig/Smarty/templates/RelatedLists.tpl 2007-05-04 16:12:15.000000000 +0200 +++ htdocs/Smarty/templates/RelatedLists.tpl 2007-05-08 22:57:59.000000000 +0200 @@ -122,8 +122,21 @@ {$SINGLE_MOD} {$APP.LBL_INFORMATION} {/if}   - {$APP.LBL_MORE} {$APP.LBL_INFORMATION} -   + {if $MODULE eq 'Products'} + {if $RELATEDLISTS ne ''} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {else} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {/if} +   + {else} + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} +   + {/if} @@ -137,12 +150,12 @@ -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 15:43:12.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-09 00:28:57.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Emails/EmailsAjax.php htdocs/modules/Emails/EmailsAjax.php --- orig/modules/Emails/EmailsAjax.php 2007-05-04 16:12:10.000000000 +0200 +++ htdocs/modules/Emails/EmailsAjax.php 2007-05-09 00:55:09.000000000 +0200 @@ -1,54 +1,54 @@ -retrieve_entity_info($crmid,"Emails"); - $modObj->column_fields[$fieldname] = $fieldvalue; - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Emails"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -elseif($_REQUEST['ajaxmode'] == 'qcreate') -{ - require_once('quickcreate.php'); -} -else -{ - require_once('include/Ajax/CommonAjax.php'); -} -?> +retrieve_entity_info($crmid,"Emails"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Emails"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +elseif($_REQUEST['ajaxmode'] == 'qcreate') +{ + require_once('quickcreate.php'); +} +else +{ + require_once('include/Ajax/CommonAjax.php'); +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Notes/Delete.php htdocs/modules/Notes/Delete.php --- htdocs.orig/modules/Notes/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Notes/Delete.php 2007-05-09 00:57:22.000000000 +0200 @@ -1,35 +1,35 @@ - + -------------- next part -------------- diff -ruN htdocs.orig/modules/Portal/Popup.php htdocs/modules/Portal/Popup.php --- htdocs.orig/modules/Portal/Popup.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Popup.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,68 +1,68 @@ -query($query); - $portalname = $adb->query_result($result,0,'portalname'); - $portalurl = $adb->query_result($result,0,'portalurl'); -} -$portal_inputs=''; -$portal_inputs.='
-
- - {include file='RelatedListsHidden.tpl'} -
- {include file='RelatedListContents.tpl'} -
- + + {include file='RelatedListsHidden.tpl'} +
+ {include file='RelatedListContents.tpl'} +
+ {*-- End of Blocks--*}
- - - - -
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
- - - - -
- - - - - - - - - - - -
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
-
- - - - -
-    - -
-'; - -echo $portal_inputs; - - -?> +query($query); + $portalname = $adb->query_result($result,0,'portalname'); + $portalurl = $adb->query_result($result,0,'portalurl'); +} +$portal_inputs=''; +$portal_inputs.='
+ + + + + +
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
+ + + + +
+ + + + + + + + + + + +
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
+
+ + + + +
+    + +
+
'; + +echo $portal_inputs; + + +?> diff -ruN htdocs.orig/modules/Portal/Portal.php htdocs/modules/Portal/Portal.php --- htdocs.orig/modules/Portal/Portal.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Portal.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,45 +1,45 @@ -println("just entered the SavePortal method"); - $portalid=$adb->getUniqueID('vtiger_portal'); - $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -/** Function to update the portal in database - * @param $portalname : Type String - * @param $portalurl : Type String - * @param $portalid : Type Integer - * This function updates the portal with the given $portalname,$portalurl - * This Returns $portalid - */ -function UpdatePortal($portalname,$portalurl,$portalid) -{ - global $adb; - $adb->println("just entered the SavePortal method"); - $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -?> +println("just entered the SavePortal method"); + $portalid=$adb->getUniqueID('vtiger_portal'); + $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +/** Function to update the portal in database + * @param $portalname : Type String + * @param $portalurl : Type String + * @param $portalid : Type Integer + * This function updates the portal with the given $portalname,$portalurl + * This Returns $portalid + */ +function UpdatePortal($portalname,$portalurl,$portalid) +{ + global $adb; + $adb->println("just entered the SavePortal method"); + $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Settings/TaxConfig.php htdocs/modules/Settings/TaxConfig.php --- htdocs.orig/modules/Settings/TaxConfig.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Settings/TaxConfig.php 2007-05-09 01:00:29.000000000 +0200 @@ -1,244 +1,244 @@ -assign("EDIT_MODE", 'true'); -} -elseif($_REQUEST['sh_edit_tax'] == 'true') -{ - $smarty->assign("SH_EDIT_MODE", 'true'); -} - -//To add tax -if($_REQUEST['add_tax_type'] == 'true') -{ - //Add the given tax name and value as a new tax type - echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); - $getlist = true; -} -elseif($_REQUEST['sh_add_tax_type'] == 'true') -{ - echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); - $getlist = true; -} - -//To Disable ie., delete or enable -if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') -{ - if($_REQUEST['disable'] == 'true') - changeDeleted($_REQUEST['taxname'],1); - else - changeDeleted($_REQUEST['taxname'],0); - $getlist = true; -} -elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') -{ - if($_REQUEST['sh_disable'] == 'true') - changeDeleted($_REQUEST['sh_taxname'],1,'sh'); - else - changeDeleted($_REQUEST['sh_taxname'],0,'sh'); - $getlist = true; -} - -//after done save or enable/disable or added new tax the list will be retrieved again from db -if($getlist) -{ - $tax_details = getAllTaxes(); - $sh_tax_details = getAllTaxes('all','sh'); -} - -$smarty->assign("TAX_COUNT", count($tax_details)); -$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); - -if(count($tax_details) == 0) - $smarty->assign("TAX_COUNT", 0); -if(count($sh_tax_details) == 0) - $smarty->assign("SH_TAX_COUNT", 0); - -$smarty->assign("TAX_VALUES", $tax_details); - -$smarty->assign("SH_TAX_VALUES", $sh_tax_details); - -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("MOD", $mod_strings); -$smarty->display("Settings/TaxConfig.tpl"); - - -/** Function to update the list of Tax percentages for the passed tax types - * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxPercentages($new_percentages, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_percentages as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} - -/** Function to update the list of Tax Labels for the taxes - * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxLabels($new_labels, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_labels as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} -/** Function used to add the tax type which will do database alterations - * @param string $taxlabel - tax label name to be added - * @param string $taxvalue - tax value to be added - * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table - * @return void - */ -function addTaxType($taxlabel, $taxvalue, $sh='') -{ - global $adb, $log; - $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); - - //First we will check whether the tax is already available or not - if($sh != '' && $sh == 'sh') - $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; - else - $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; - $check_res = $adb->query($check_query); - - if($adb->num_rows($check_res) > 0) - return "This tax is already available"; - - //if the tax is not available then add this tax. - //Add this tax as a column in related table - if($sh != '' && $sh == 'sh') - { - $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); - $taxname = "shtax".$taxid; - $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; - } - else - { - $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); - $taxname = "tax".$taxid; - $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; - } - $res = $adb->query($query); - - //if the tax is added as a column then we should add this tax in the list of taxes - if($res) - { - if($sh != '' && $sh == 'sh') - $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - else - $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - - $res1 = $adb->query($query1); - } - - $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); - if($res1) - return ''; - else - return "There may be some problem in adding the Tax type. Please try again"; -} - -/** Function used to Enable or Disable the tax type - * @param string $taxname - taxname to enable or disble - * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable - * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo - * @return void - */ -function changeDeleted($taxname, $deleted, $sh='') -{ - global $log, $adb; - $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); - - if($sh == 'sh') - $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); - else - $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); - $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); -} - -?> +assign("EDIT_MODE", 'true'); +} +elseif($_REQUEST['sh_edit_tax'] == 'true') +{ + $smarty->assign("SH_EDIT_MODE", 'true'); +} + +//To add tax +if($_REQUEST['add_tax_type'] == 'true') +{ + //Add the given tax name and value as a new tax type + echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); + $getlist = true; +} +elseif($_REQUEST['sh_add_tax_type'] == 'true') +{ + echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); + $getlist = true; +} + +//To Disable ie., delete or enable +if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') +{ + if($_REQUEST['disable'] == 'true') + changeDeleted($_REQUEST['taxname'],1); + else + changeDeleted($_REQUEST['taxname'],0); + $getlist = true; +} +elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') +{ + if($_REQUEST['sh_disable'] == 'true') + changeDeleted($_REQUEST['sh_taxname'],1,'sh'); + else + changeDeleted($_REQUEST['sh_taxname'],0,'sh'); + $getlist = true; +} + +//after done save or enable/disable or added new tax the list will be retrieved again from db +if($getlist) +{ + $tax_details = getAllTaxes(); + $sh_tax_details = getAllTaxes('all','sh'); +} + +$smarty->assign("TAX_COUNT", count($tax_details)); +$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); + +if(count($tax_details) == 0) + $smarty->assign("TAX_COUNT", 0); +if(count($sh_tax_details) == 0) + $smarty->assign("SH_TAX_COUNT", 0); + +$smarty->assign("TAX_VALUES", $tax_details); + +$smarty->assign("SH_TAX_VALUES", $sh_tax_details); + +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("APP", $app_strings); +$smarty->assign("MOD", $mod_strings); +$smarty->display("Settings/TaxConfig.tpl"); + + +/** Function to update the list of Tax percentages for the passed tax types + * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxPercentages($new_percentages, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_percentages as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} + +/** Function to update the list of Tax Labels for the taxes + * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxLabels($new_labels, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_labels as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} +/** Function used to add the tax type which will do database alterations + * @param string $taxlabel - tax label name to be added + * @param string $taxvalue - tax value to be added + * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table + * @return void + */ +function addTaxType($taxlabel, $taxvalue, $sh='') +{ + global $adb, $log; + $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); + + //First we will check whether the tax is already available or not + if($sh != '' && $sh == 'sh') + $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; + else + $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; + $check_res = $adb->query($check_query); + + if($adb->num_rows($check_res) > 0) + return "This tax is already available"; + + //if the tax is not available then add this tax. + //Add this tax as a column in related table + if($sh != '' && $sh == 'sh') + { + $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); + $taxname = "shtax".$taxid; + $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; + } + else + { + $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); + $taxname = "tax".$taxid; + $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; + } + $res = $adb->query($query); + + //if the tax is added as a column then we should add this tax in the list of taxes + if($res) + { + if($sh != '' && $sh == 'sh') + $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + else + $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + + $res1 = $adb->query($query1); + } + + $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); + if($res1) + return ''; + else + return "There may be some problem in adding the Tax type. Please try again"; +} + +/** Function used to Enable or Disable the tax type + * @param string $taxname - taxname to enable or disble + * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable + * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo + * @return void + */ +function changeDeleted($taxname, $deleted, $sh='') +{ + global $log, $adb; + $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); + + if($sh == 'sh') + $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); + else + $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); + $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); +} + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Users/DetailViewAjax.php htdocs/modules/Users/DetailViewAjax.php --- htdocs.orig/modules/Users/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/DetailViewAjax.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,35 +1,35 @@ - "; -$local_log =& LoggerManager::getLogger('UsersAjax'); +$local_log =& LoggerManager::getLogger('UsersAjax'); $my_status = "Failure"; -$ajaxaction = $_REQUEST["ajxaction"]; -if($ajaxaction == "DETAILVIEW") -{ - $crmid = $_REQUEST["recordid"]; - $tablename = $_REQUEST["tableName"]; - $fieldname = $_REQUEST["fldName"]; - $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); +$ajaxaction = $_REQUEST["ajxaction"]; +if($ajaxaction == "DETAILVIEW") +{ + $crmid = $_REQUEST["recordid"]; + $tablename = $_REQUEST["tableName"]; + $fieldname = $_REQUEST["fldName"]; + $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); $local_log->debug("Entering DetailViewAjax crmid=".$crmid." tab=".$tablename." fld=".$fieldname." val='".$fieldvalue."'"); - if($crmid != "") - { - $userObj = new Users(); - $userObj->retrieve_entity_info($crmid,"Users"); + if($crmid != "") + { + $userObj = new Users(); + $userObj->retrieve_entity_info($crmid,"Users"); //assigned organizations if( $fieldname == 'assigned_org[]') { @@ -173,30 +173,30 @@ $adb->completeTransaction(); //Organization assignment - require('modules/Users/GetUserOrg.php'); + require('modules/Users/GetUserOrg.php'); } //anything else is a field update else { - $userObj->column_fields[$fieldname] = $fieldvalue; - $userObj->id = $crmid; - $userObj->mode = "edit"; - $userObj->save("Users"); + $userObj->column_fields[$fieldname] = $fieldvalue; + $userObj->id = $crmid; + $userObj->mode = "edit"; + $userObj->save("Users"); } //result would be success as long as the user exists - if($userObj->id != "") - { - echo ":#:SUCCESS"; + if($userObj->id != "") + { + echo ":#:SUCCESS"; $my_status = "Success"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } $local_log->debug("Exit DetailViewAjax: ".$my_status); -} -?> +} +?> diff -ruN htdocs.orig/modules/Users/EditView.php htdocs/modules/Users/EditView.php --- htdocs.orig/modules/Users/EditView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/EditView.php 2007-05-09 01:01:55.000000000 +0200 @@ -42,7 +42,7 @@ $smarty->assign("ID",$_REQUEST['record']); $mode='edit'; if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) die ("Unauthorized access to user administration."); - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); $smarty->assign("USERNAME",$focus->last_name.' '.$focus->first_name); }else { @@ -59,6 +59,11 @@ $focus->column_fields['confirm_password']=''; } +if(is_admin($current_user)) + $smarty->assign("IS_ADMIN", true); +else + $smarty->assign("IS_ADMIN", false); + global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; @@ -111,9 +116,57 @@ $smarty->assign("HOMEORDER",$focus->getHomeOrder($focus->id)); $smarty->assign("DUPLICATE",$_REQUEST['isDuplicate']); - $smarty->assign('PARENTTAB',$_REQUEST['parenttab']); +//Organization assignment +if( $mode == "create" ) { + $orgs = array(); + $smarty_orgs = array($orgs); + + //all organizations + $sql = "SELECT organizationname FROM vtiger_organizationdetails WHERE deleted=0"; + $result = $adb->query($sql); + $allorgs = array(); + while($org_result = $adb->fetch_array($result)) { + $key = $org_result["organizationname"]; + $allorgs[$key] = ''; + } + $smarty_allorgs = array($allorgs); + + //Organization untis + $orgunits = array(); + $smarty_orgunits = array($orgunits); + + //The remaining field are intentially left blank + $curorg = ""; + $assigned_org = ""; + $prim_orgunits = ""; + $org_separator = "
 "; + + //Set up session variables + $_SESSION['all_user_organizations'] = $smarty_allorgs; + $_SESSION['edit_user_organizations'] = $smarty_orgs; + $_SESSION['edit_user_orgunits'] = $smarty_orgunits; + $_SESSION['edit_user_primary_organization'] = $curorg; + $_SESSION['edit_user_assigned_organization'] = $assigned_org; + $_SESSION['edit_user_primary_orgunits'] = $prim_orgunits; +} + +//In case of edit mode use the predefined gathering fuction +else { + $crmid = $focus->id; + require('modules/Users/GetUserOrg.php'); +} + +//Assign the organization details to the html output +$smarty->assign("MULTISELECT_COMBO_BOX_ITEM_SEPARATOR_STRING", $org_separator); +$smarty->assign("ALL_USER_ORGANIZATIONS", $smarty_allorgs); +$smarty->assign("EDIT_USER_ORGANIZATIONS", $smarty_orgs); +$smarty->assign("EDIT_USER_ORGUNITS", $smarty_orgunits); +$smarty->assign("EDIT_USER_PRIMARY_ORGANIZATION", $curorg); +$smarty->assign("EDIT_USER_ASSIGNED_ORGANIZATIONS", $assigned_org); +$smarty->assign("EDIT_USER_PRIMARY_ORGUNITS", $prim_orgunits); + $smarty->display('UserEditView.tpl'); ?> diff -ruN htdocs.orig/modules/Users/ListView.php htdocs/modules/Users/ListView.php --- htdocs.orig/modules/Users/ListView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/ListView.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,82 +1,82 @@ -query($list_query); -//Retreive the Navigation array -$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); - -$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("CMOD", $mod_strings); -$smarty->assign("APP", $app_strings); -$smarty->assign("CURRENT_USERID", $current_user->id); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("CATEGORY",$category); -$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); -$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); -$smarty->assign("USER_COUNT",$no_of_users); -$smarty->assign("RECORD_COUNTS", $record_string); -$smarty->assign("NAVIGATION", $navigationOutput); -$smarty->assign("USER_IMAGES",getUserImageNames()); -if($_REQUEST['ajax'] !='') - $smarty->display("UserListViewContents.tpl"); -else - $smarty->display("UserListView.tpl"); - -?> +query($list_query); +//Retreive the Navigation array +$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); + +$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("CMOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("CURRENT_USERID", $current_user->id); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("CATEGORY",$category); +$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); +$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); +$smarty->assign("USER_COUNT",$no_of_users); +$smarty->assign("RECORD_COUNTS", $record_string); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("USER_IMAGES",getUserImageNames()); +if($_REQUEST['ajax'] !='') + $smarty->display("UserListViewContents.tpl"); +else + $smarty->display("UserListView.tpl"); + +?> diff -ruN htdocs.orig/modules/Users/Logout.php htdocs/modules/Users/Logout.php --- htdocs.orig/modules/Users/Logout.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Logout.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,109 +1,109 @@ -query($query); - $num_rows = $adb->num_rows($result); - if($num_rows > 0) - { - $ftpserver = $adb->query_result($result,0,'server'); - $ftpuser = $adb->query_result($result,0,'server_username'); - $ftppassword = $adb->query_result($result,0,'server_password'); - } - - //Taking the Backup of DB - $currenttime=date("Ymd_His"); - if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') - { $backupFileName="backup_".$currenttime.".sql"; - save_structure($backupFileName, $root_directory); - $source_file=$backupFileName; - ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); - if(file_exists($source_file)) unlink($source_file); - - } -} -// Recording Logout Info - $usip=$_SERVER['REMOTE_ADDR']; - $outtime=date("Y/m/d H:i:s"); - $loghistory=new LoginHistory(); - $loghistory->user_logout($current_user->user_name,$usip,$outtime); - - -$local_log =& LoggerManager::getLogger('Logout'); - -//Calendar Logout -//include('modules/Calendar/logout.php'); - -// clear out the autthenticating flag -session_destroy(); - -define("IN_LOGIN", true); - -// define('IN_PHPBB', true); -// include($phpbb_root_path . 'extension.inc'); -// include($phpbb_root_path . 'common.'.$phpEx); - -// -// Set page ID for session management -// -//$userdata = session_pagestart($user_ip, PAGE_LOGIN); -//init_userprefs($userdata); -// -// End session management -// - -// session id check -/* -if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) -{ - $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; -} -else -{ - $sid = ''; -} -if( $userdata['session_logged_in'] ) - { - if( $userdata['session_logged_in'] ) - { - session_end($userdata['session_id'], $userdata['user_id']); - } - - } -*/ -// go to the login screen. -header("Location: index.php?action=Login&module=Users"); -?> +query($query); + $num_rows = $adb->num_rows($result); + if($num_rows > 0) + { + $ftpserver = $adb->query_result($result,0,'server'); + $ftpuser = $adb->query_result($result,0,'server_username'); + $ftppassword = $adb->query_result($result,0,'server_password'); + } + + //Taking the Backup of DB + $currenttime=date("Ymd_His"); + if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') + { $backupFileName="backup_".$currenttime.".sql"; + save_structure($backupFileName, $root_directory); + $source_file=$backupFileName; + ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); + if(file_exists($source_file)) unlink($source_file); + + } +} +// Recording Logout Info + $usip=$_SERVER['REMOTE_ADDR']; + $outtime=date("Y/m/d H:i:s"); + $loghistory=new LoginHistory(); + $loghistory->user_logout($current_user->user_name,$usip,$outtime); + + +$local_log =& LoggerManager::getLogger('Logout'); + +//Calendar Logout +//include('modules/Calendar/logout.php'); + +// clear out the autthenticating flag +session_destroy(); + +define("IN_LOGIN", true); + +// define('IN_PHPBB', true); +// include($phpbb_root_path . 'extension.inc'); +// include($phpbb_root_path . 'common.'.$phpEx); + +// +// Set page ID for session management +// +//$userdata = session_pagestart($user_ip, PAGE_LOGIN); +//init_userprefs($userdata); +// +// End session management +// + +// session id check +/* +if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) +{ + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; +} +else +{ + $sid = ''; +} +if( $userdata['session_logged_in'] ) + { + if( $userdata['session_logged_in'] ) + { + session_end($userdata['session_id'], $userdata['user_id']); + } + + } +*/ +// go to the login screen. +header("Location: index.php?action=Login&module=Users"); +?> diff -ruN htdocs.orig/modules/Users/Save.php htdocs/modules/Users/Save.php --- htdocs.orig/modules/Users/Save.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Save.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,168 +1,168 @@ -query($query); - if($adb->num_rows($result) > 0) - { - echo 'User Name Already Exists!'; - die; - }else - { - echo 'SUCCESS'; - die; - } -} - -if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); -elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); - -$focus = new Users(); -if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') -{ - $focus->mode='edit'; - $focus->id = $_REQUEST["record"]; -} -else -{ - $focus->mode=''; -} - - -if($_REQUEST['changepassword'] == 'true') -{ - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); - $focus->id = $_REQUEST['record']; -if (isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $old_pass = $_POST['old_password']; - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -} - - -//save user Image -if(! $_REQUEST['changepassword'] == 'true') -{ - if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - - if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; - //Code contributed by mike crowe for rearrange the home page and tab - if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; - if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; - - setObjectValuesFromRequest(&$focus); - $focus->saveentity("Users"); - //$focus->imagename = $image_upload_array['imagename']; - $focus->saveHomeOrder($focus->id); - $return_id = $focus->id; - -if (isset($_POST['user_name']) && isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -if(isset($focus->id) && $focus->id != '') -{ - - if(isset($_POST['user_role'])) - { - updateUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name']) && $_POST['group_name'] != '') - { - updateUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} -else -{ - if(isset($_POST['user_role'])) - { - insertUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name'])) - { - insertUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} - -//Creating the Privileges Flat File -require_once('modules/Users/CreateUserPrivilegeFile.php'); -createUserPrivilegesfile($focus->id); -createUserSharingPrivilegesfile($focus->id); - -} -if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; -else $return_module = "Users"; -if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; -else $return_action = "DetailView"; -if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; -if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; -if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; - -$log->debug("Saved record with id of ".$return_id); - - - -if($_REQUEST['modechk'] == 'prefview') - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); -else - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); - - -?> +query($query); + if($adb->num_rows($result) > 0) + { + echo 'User Name Already Exists!'; + die; + }else + { + echo 'SUCCESS'; + die; + } +} + +if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); +elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); + +$focus = new Users(); +if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') +{ + $focus->mode='edit'; + $focus->id = $_REQUEST["record"]; +} +else +{ + $focus->mode=''; +} + + +if($_REQUEST['changepassword'] == 'true') +{ + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->id = $_REQUEST['record']; +if (isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $old_pass = $_POST['old_password']; + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +} + + +//save user Image +if(! $_REQUEST['changepassword'] == 'true') +{ + if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + + if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; + //Code contributed by mike crowe for rearrange the home page and tab + if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; + if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; + + setObjectValuesFromRequest(&$focus); + $focus->saveentity("Users"); + //$focus->imagename = $image_upload_array['imagename']; + $focus->saveHomeOrder($focus->id); + $return_id = $focus->id; + +if (isset($_POST['user_name']) && isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +if(isset($focus->id) && $focus->id != '') +{ + + if(isset($_POST['user_role'])) + { + updateUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name']) && $_POST['group_name'] != '') + { + updateUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} +else +{ + if(isset($_POST['user_role'])) + { + insertUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name'])) + { + insertUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} + +//Creating the Privileges Flat File +require_once('modules/Users/CreateUserPrivilegeFile.php'); +createUserPrivilegesfile($focus->id); +createUserSharingPrivilegesfile($focus->id); + +} +if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; +else $return_module = "Users"; +if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; +else $return_action = "DetailView"; +if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; +if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; +if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; + +$log->debug("Saved record with id of ".$return_id); + + + +if($_REQUEST['modechk'] == 'prefview') + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); +else + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); + + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Products/Delete.php htdocs/modules/Products/Delete.php --- htdocs.orig/modules/Products/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/Delete.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,40 +1,40 @@ - + diff -ruN htdocs.orig/modules/Products/DetailViewAjax.php htdocs/modules/Products/DetailViewAjax.php --- htdocs.orig/modules/Products/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/DetailViewAjax.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Products"); - $modObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'unit_price')//unit price converted to dollar value while saving - { - $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Products"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Products"); + $modObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'unit_price')//unit price converted to dollar value while saving + { + $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Products"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php --- htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 01:04:34.000000000 +0200 @@ -1,125 +1,125 @@ -$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries - */ -function getTopPurchaseOrder() -{ - require_once("data/Tracker.php"); - require_once('modules/PurchaseOrder/PurchaseOrder.php'); - require_once('include/logging.php'); - require_once('include/ListView/ListView.php'); - require_once('include/database/PearDatabase.php'); - require_once('include/ComboUtil.php'); - require_once('include/utils/utils.php'); - require_once('modules/CustomView/CustomView.php'); - - global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; - $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); - - $log = LoggerManager::getLogger('po_list'); - - $url_string = ''; - $sorder = ''; - $oCustomView = new CustomView("PurchaseOrder"); - $customviewcombo_html = $oCustomView->getCustomViewCombo(); - if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') - { - if($oCustomView->setdefaultviewid != "") - { - $viewid = $oCustomView->setdefaultviewid; - }else - { - $viewid = "0"; - } - } - $focus = new PurchaseOrder(); - - $theme_path="themes/".$theme."/"; - $image_path=$theme_path."images/"; - - //Retreive the list from Database - //<<<<<<<<>>>>>>>> - $date_var = date('Y-m-d'); - - $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; - $query = getListQuery("PurchaseOrder",$where); - $query .=" ORDER BY total DESC"; - - //<<<<<<<>>>>>>>> - - $list_result = $adb->limitQuery($query,0,5); - - //Retreiving the no of rows - $noofrows = $adb->num_rows($list_result); - - //Retreiving the start value from request - if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') - { - $start = $_REQUEST['start']; - } - else - { - - $start = 1; - } - - //Retreive the Navigation array - $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); - - if ($navigation_array['start'] == 1) - { - if($noofrows != 0) - $start_rec = $navigation_array['start']; - else - $start_rec = 0; - if($noofrows > $list_max_entries_per_page) - { - $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; - } - else - { - $end_rec = $noofrows; - } - - } - else - { - if($navigation_array['next'] > $list_max_entries_per_page) - { - $start_rec = $navigation_array['next'] - $list_max_entries_per_page; - $end_rec = $navigation_array['next'] - 1; - } - else - { - $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; - $end_rec = $noofrows; - } - } - - - //Retreive the List View Table Header - $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); - $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); - - $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); - $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); - if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) - return $values; -} -?> - +$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries + */ +function getTopPurchaseOrder() +{ + require_once("data/Tracker.php"); + require_once('modules/PurchaseOrder/PurchaseOrder.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + require_once('include/database/PearDatabase.php'); + require_once('include/ComboUtil.php'); + require_once('include/utils/utils.php'); + require_once('modules/CustomView/CustomView.php'); + + global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; + $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); + + $log = LoggerManager::getLogger('po_list'); + + $url_string = ''; + $sorder = ''; + $oCustomView = new CustomView("PurchaseOrder"); + $customviewcombo_html = $oCustomView->getCustomViewCombo(); + if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') + { + if($oCustomView->setdefaultviewid != "") + { + $viewid = $oCustomView->setdefaultviewid; + }else + { + $viewid = "0"; + } + } + $focus = new PurchaseOrder(); + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + //Retreive the list from Database + //<<<<<<<<>>>>>>>> + $date_var = date('Y-m-d'); + + $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; + $query = getListQuery("PurchaseOrder",$where); + $query .=" ORDER BY total DESC"; + + //<<<<<<<>>>>>>>> + + $list_result = $adb->limitQuery($query,0,5); + + //Retreiving the no of rows + $noofrows = $adb->num_rows($list_result); + + //Retreiving the start value from request + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + { + $start = $_REQUEST['start']; + } + else + { + + $start = 1; + } + + //Retreive the Navigation array + $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); + + if ($navigation_array['start'] == 1) + { + if($noofrows != 0) + $start_rec = $navigation_array['start']; + else + $start_rec = 0; + if($noofrows > $list_max_entries_per_page) + { + $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; + } + else + { + $end_rec = $noofrows; + } + + } + else + { + if($navigation_array['next'] > $list_max_entries_per_page) + { + $start_rec = $navigation_array['next'] - $list_max_entries_per_page; + $end_rec = $navigation_array['next'] - 1; + } + else + { + $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; + $end_rec = $noofrows; + } + } + + + //Retreive the List View Table Header + $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); + $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); + + $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); + $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); + if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) + return $values; +} +?> + -------------- next part -------------- diff -ruN htdocs.orig/modules/Potentials/language/en_us.lang.php htdocs/modules/Potentials/language/en_us.lang.php --- htdocs.orig/modules/Potentials/language/en_us.lang.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Potentials/language/en_us.lang.php 2007-05-09 01:05:32.000000000 +0200 @@ -1,153 +1,153 @@ -'Potentials', -'LBL_MODULE_TITLE'=>'Potentials: Home', -'LBL_SEARCH_FORM_TITLE'=>'Potential Search', -'LBL_LIST_FORM_TITLE'=>'Potential List', -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_OPPORTUNITY'=>'Potential:', -'LBL_NAME'=>'Potential Name', -'LBL_INVITEE'=>'Contacts', -'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_PRODUCT_NAME'=>'Product Name', -'LBL_LIST_AMOUNT'=>'Amount', -'LBL_LIST_DATE_CLOSED'=>'Expected Close', -'LBL_LIST_SALES_STAGE'=>'Sales Stage', - -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_AMOUNT'=>'Amount:', -'LBL_DATE_CLOSED'=>'Expected Close Date:', -'LBL_TYPE'=>'Type:', -'LBL_NEXT_STEP'=>'Next Step:', -'LBL_LEAD_SOURCE'=>'Lead Source:', -'LBL_SALES_STAGE'=>'Sales Stage:', -'LBL_PROBABILITY'=>'Probability (%):', -'LBL_DESCRIPTION'=>'Description:', -'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', - -'LBL_NEW_FORM_TITLE'=>'New Potential', - -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", -'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", - -'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', - -'NTC_NONE_SCHEDULED'=>'None scheduled.', - -'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', -'LBL_GENERAL_INFORMATION'=>'General Information', - - - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_NOTE'=>'New Note', -'LBL_NOTE_TITLE'=>'Notes', - -'LBL_NEW_ATTACHMENT'=>'New Attachment', -'LBL_ATTACHMENT_TITLE'=>'Attachments', - -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_WON'=>'Won', -'LBL_LOST'=>'Lost', -'LBL_VALUE_PROPOSITION'=>'Value Proposition', -'LBL_PROSPECTING'=>'Prospecting', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Potential Tools', -//Added for 4GA -'Potential Name'=>'Potential Name', -'Amount'=>'Amount', -'Account Name'=>'Account Name', -'Currency'=>'Currency', -'Expected Close Date'=>'Expected Close Date', -'Opportunity Type'=>'Opportunity Type', -'Type'=>'Type', -'Next Step'=>'Next Step', -'Lead Source'=>'Lead Source', -'Sales Stage'=>'Sales Stage', -'Assigned To'=>'Assigned To', -'Probability'=>'Probability (%)', -'Campaign Source'=>'Campaign Source', -'Description'=>'Description', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Organization unit'=>'Organization unit', -//Added for 4.2 Release -- CustomView -'Potential'=>'Potential', -'Expected Close'=>'Expected Close', - -//Added for Existing Picklist Strings - -'Prospecting'=>'Prospecting', -'Qualification'=>'Qualification', -'Needs Analysis'=>'Needs Analysis', -'Value Proposition'=>'Value Proposition', -'Id. Decision Makers'=>'Id. Decision Makers', -'Perception Analysis'=>'Perception Analysis', -'Proposal/Price Quote'=>'Proposal/Price Quote', -'Negotiation/Review'=>'Negotiation/Review', -'Closed Won'=>'Closed Won', -'Closed Lost'=>'Closed Lost', - -'Cold Call'=>'Cold Call', -'Existing Customer'=>'Existing Customer', -'Self Generated'=>'Self Generated', -'Employee'=>'Employee', -'Partner'=>'Partner', -'Public Relations'=>'Public Relations', -'Direct Mail'=>'Direct Mail', -'Conference'=>'Conference', -'Trade Show'=>'Trade Show', -'Web Site'=>'Web Site', -'Word of mouth'=>'Word of mouth', -'Other'=>'Other', - -'--None--'=>'--None--', -'Existing Business'=>'Existing Business', -'New Business'=>'New Business', - - - -); - -?> +'Potentials', +'LBL_MODULE_TITLE'=>'Potentials: Home', +'LBL_SEARCH_FORM_TITLE'=>'Potential Search', +'LBL_LIST_FORM_TITLE'=>'Potential List', +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_OPPORTUNITY'=>'Potential:', +'LBL_NAME'=>'Potential Name', +'LBL_INVITEE'=>'Contacts', +'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_PRODUCT_NAME'=>'Product Name', +'LBL_LIST_AMOUNT'=>'Amount', +'LBL_LIST_DATE_CLOSED'=>'Expected Close', +'LBL_LIST_SALES_STAGE'=>'Sales Stage', + +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_AMOUNT'=>'Amount:', +'LBL_DATE_CLOSED'=>'Expected Close Date:', +'LBL_TYPE'=>'Type:', +'LBL_NEXT_STEP'=>'Next Step:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_SALES_STAGE'=>'Sales Stage:', +'LBL_PROBABILITY'=>'Probability (%):', +'LBL_DESCRIPTION'=>'Description:', +'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +'LBL_NEW_FORM_TITLE'=>'New Potential', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", +'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", + +'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', + +'NTC_NONE_SCHEDULED'=>'None scheduled.', + +'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', +'LBL_GENERAL_INFORMATION'=>'General Information', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Note', +'LBL_NOTE_TITLE'=>'Notes', + +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_ATTACHMENT_TITLE'=>'Attachments', + +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_WON'=>'Won', +'LBL_LOST'=>'Lost', +'LBL_VALUE_PROPOSITION'=>'Value Proposition', +'LBL_PROSPECTING'=>'Prospecting', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Potential Tools', +//Added for 4GA +'Potential Name'=>'Potential Name', +'Amount'=>'Amount', +'Account Name'=>'Account Name', +'Currency'=>'Currency', +'Expected Close Date'=>'Expected Close Date', +'Opportunity Type'=>'Opportunity Type', +'Type'=>'Type', +'Next Step'=>'Next Step', +'Lead Source'=>'Lead Source', +'Sales Stage'=>'Sales Stage', +'Assigned To'=>'Assigned To', +'Probability'=>'Probability (%)', +'Campaign Source'=>'Campaign Source', +'Description'=>'Description', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Organization unit'=>'Organization unit', +//Added for 4.2 Release -- CustomView +'Potential'=>'Potential', +'Expected Close'=>'Expected Close', + +//Added for Existing Picklist Strings + +'Prospecting'=>'Prospecting', +'Qualification'=>'Qualification', +'Needs Analysis'=>'Needs Analysis', +'Value Proposition'=>'Value Proposition', +'Id. Decision Makers'=>'Id. Decision Makers', +'Perception Analysis'=>'Perception Analysis', +'Proposal/Price Quote'=>'Proposal/Price Quote', +'Negotiation/Review'=>'Negotiation/Review', +'Closed Won'=>'Closed Won', +'Closed Lost'=>'Closed Lost', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', +'Other'=>'Other', + +'--None--'=>'--None--', +'Existing Business'=>'Existing Business', +'New Business'=>'New Business', + + + +); + +?> -------------- next part -------------- diff -ruN htdocs.orig/parent_tabdata.php htdocs/parent_tabdata.php --- htdocs.orig/parent_tabdata.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/parent_tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,13 +1,21 @@ 'My Home Page',2=>'Marketing',3=>'Sales',4=>'Support',5=>'Analytics',6=>'Inventory',7=>'Tools',8=>'Settings'); -$parent_child_tab_rel_array=array(1=>array(3,9,28,),2=>array(26,6,4,28,7,9,8,),3=>array(7,6,4,2,20,22,23,14,19,8,9,),4=>array(13,15,6,4,14,8,28,9,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(30,31,),); +$parent_child_tab_rel_array=array(1=>array(3,9,10,),2=>array(26,6,4,),3=>array(7,6,4,2,20,22,23,14,19,8,),4=>array(13,15,6,4,14,8,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(),); -?> \ No newline at end of file +?> diff -ruN htdocs.orig/tabdata.php htdocs/tabdata.php --- htdocs.orig/tabdata.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,15 +1,17 @@ 3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,'Organization'=>30,'OrgUnit'=>31,); - -$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,'29'=>0,'30'=>0,'31'=>0,); - -$tab_ownedby_array=array('3'=>1,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>1,'9'=>0,'10'=>1,'13'=>0,'14'=>1,'1'=>1,'15'=>1,'16'=>0,'18'=>1,'19'=>1,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>1,'25'=>1,'26'=>0,'27'=>1,'28'=>1,'29'=>1,'30'=>0,'31'=>0,); - -$action_id_array=array('Save'=>0,'EditView'=>1,'Delete'=>2,'index'=>3,'DetailView'=>4,'Import'=>5,'Export'=>6,'Merge'=>8,'VendorEditView'=>1,'VendorDetailView'=>4,'SaveVendor'=>0,'DeleteVendor'=>2,'PriceBookEditView'=>1,'PriceBookDetailView'=>4,'SavePriceBook'=>0,'DeletePriceBook'=>2,'ConvertLead'=>9,'DetailViewAjax'=>1,'TagCloud'=>4,'QuickCreate'=>1,'Popup'=>3); +$tab_info_array=array('Home'=>3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,); -$action_name_array=array(0=>'Save',1=>'EditView',2=>'Delete',3=>'index',4=>'DetailView',5=>'Import',6=>'Export',8=>'Merge',9=>'ConvertLead'); -?> \ No newline at end of file +$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,); +?> -------------- next part -------------- diff -ruN htdocs.orig/themes/alphagrey/header.php htdocs/themes/alphagrey/header.php --- htdocs.orig/themes/alphagrey/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/alphagrey/header.php 2007-05-09 01:56:53.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/bluelagoon/header.php htdocs/themes/bluelagoon/header.php --- htdocs.orig/themes/bluelagoon/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/bluelagoon/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/woodspice/header.php htdocs/themes/woodspice/header.php --- htdocs.orig/themes/woodspice/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/woodspice/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> From weigelt at metux.de Thu May 10 08:20:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:20:49 +0200 Subject: [Vtigercrm-developers] [PATCH] __toString() fix Message-ID: <20070510152049.GB25395@nibiru.local> Hi folks, there were some __toString() methods necessary ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN cleaned/data/CRMEntity.php working/data/CRMEntity.php --- cleaned/data/CRMEntity.php 2007-05-03 17:50:00.000000000 +0200 +++ working/data/CRMEntity.php 2007-05-03 23:38:06.000000000 +0200 @@ -25,10 +25,16 @@ require_once('data/Tracker.php'); require_once('include/utils/utils.php'); require_once('include/utils/UserInfoUtil.php'); - -class CRMEntity -{ - /** + +class CRMEntity +{ + /* generic toString() method added by nekrad */ + function __toString() + { + return serialize($this); + } + + /** * This method implements a generic insert and update logic for any SugarBean * This method only works for subclasses that implement the same variable names. * This method uses the presence of an id vtiger_field that is not null to signify and update. diff -ruN cleaned/modules/Users/Users.php working/modules/Users/Users.php --- cleaned/modules/Users/Users.php 2007-05-04 02:32:05.000000000 +0200 +++ working/modules/Users/Users.php 2007-05-04 02:59:03.000000000 +0200 @@ -163,6 +163,11 @@ $this->log->debug("Exiting Users() method ..."); } + function __toString() + { + return "[[USERS]]"; + } + // Mike Crowe Mod --------------------------------------------------------Default ordering for us /** * Function to get sort order From weigelt at metux.de Thu May 10 08:21:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:21:41 +0200 Subject: [Vtigercrm-developers] [PATCH] remove noise in invoice module Message-ID: <20070510152141.GC25395@nibiru.local> Hi folks, this patch removes some noise in the invoice module ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/js/Inventory.js htdocs/include/js/Inventory.js --- orig/include/js/Inventory.js 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/js/Inventory.js 2007-05-08 21:51:32.000000000 +0200 @@ -225,8 +225,8 @@ var max_row_count = document.getElementById('proTab').rows.length; max_row_count = eval(max_row_count)-2;//As the table has two header rows, we will reduce two from table row length - if(!FindDuplicate()) - return false; +// if(!FindDuplicate()) +// return false; if(max_row_count == 0) { @@ -357,12 +357,12 @@ } } } - if(duplicate) - { - //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); - if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) - return false; - } +// if(duplicate) +// { +// //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); +// if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) +// return false; +// } return true; } From weigelt at metux.de Thu May 10 08:26:38 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:26:38 +0200 Subject: [Vtigercrm-developers] [PATCH] render API v1 Message-ID: <20070510152638.GD25395@nibiru.local> Hi folks, here're some patches to introduce my new preprint rendering API. For now there's just an latex backend, but adding more should be quite simple. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/lib/render/README htdocs/lib/render/README --- htdocs.orig/lib/render/README 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/README 2007-05-09 13:53:10.000000000 +0200 @@ -0,0 +1 @@ +This subdirectory contains the TeX rendering stuff. diff -ruN htdocs.orig/lib/render/RenderFactory.php htdocs/lib/render/RenderFactory.php --- htdocs.orig/lib/render/RenderFactory.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/RenderFactory.php 2007-05-09 17:05:57.000000000 +0200 @@ -0,0 +1,64 @@ +engine = $e; + } + + function __toString() + { + return "Unknown Engine: \"".$this->engine."\""; + } +} + +class E_Render_FormatNotSupportedByEngine extends Exception +{ + var $engine; + var $format; + + function E_Render_FormatNotSupportedByEngine($format,$engine) + { + $this->format = $format; + $this->engine = $engine; + } + + function __toString() + { + return "Format \"".$this->format. + "\" not supported by engine \"". + $this->engine. + "\""; + } +} + +class RenderFactory +{ + /* public static */ function getRenderer_Invoice($param) + { + if (!($f = $param{'format'})) + throw new Exception("missing output format"); + if (!($e = $param{'engine'})) + throw new Exception("missing engine"); + + switch ($e) + { + case 'pdflatex': + { + if ($f != 'application/pdf') + throw new E_Render_FormatNotSupportedByEngine($f,$e); + + require_once(RENDER_LIB_PREFIX.'TexRender_Invoice.php'); + return new TexRender_Invoice($param); + } + default: + throw new E_Render_UnknownEngine($e); + } + } +} diff -ruN htdocs.orig/lib/render/TexEncode.php htdocs/lib/render/TexEncode.php --- htdocs.orig/lib/render/TexEncode.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/TexEncode.php 2007-05-10 02:51:50.000000000 +0200 @@ -0,0 +1,101 @@ + + +*/ + +// NOTE: the webserver needs *write* acccess to this directory +// we normally take the session storage dir +define('TEXRENDER_TMP_MASK', '{SESSION.SAVE_PATH}/texrender-{SESSION.ID}-{NAME}'); +define('TEXRENDER_TEMPLATE_DIR', 'templates/tex/{TEMPLATE-NAME}/'); + +require_once(RENDER_LIB_PREFIX.'TexEncode.php'); + +class TexRender_Invoice +{ + /* private */ var $tmpmask; + /* private */ var $data; + /* private */ var $product_items; + /* private */ var $fn_tex; + /* private */ var $fn_pdf; + /* private */ var $fn_template; + /* private */ var $key; + + /* private */ function _tmpname($name) + { + return str_replace('{SESSION.NAME}', session_name(), + str_replace('{SESSION.ID}', session_id(), + str_replace('{SESSION.SAVE_PATH}', realpath(ini_get('session.save_path')), + str_replace('{NAME}', $name, + $this->tmpmask + )))); + } + + /* private */ function _test_write_access() + { + $fn = $this->_tmpname('write-test'); + if (!($fp=fopen($fn,"w"))) + throw new Exception("write-test: could not open file for writing: $fn"); + fputs($fp,"TEST123"); + fclose($fp); + + $res = trim(implode('',file($fn))); + if ($res != "TEST123") + throw new Exception("write-test: reading test data failed for file: $fn"); + + unlink($fn); + + return true; + } + + function TexRender_Invoice($param) + { + // test write access and otherwise failed + $this->tmpmask = TEXRENDER_TMP_MASK; + + // should be already cought by the factory, but just to be sure + if ($param{'format'} != 'application/pdf') + throw new Exception("fomat not supported by this renderer: ".$param{'format'}); + + if (!$param{'template'}) + throw new Exception("missing template name"); + + $this->template_name = $param{'template'}; + $this->data = array(); + $this->_test_write_access(); + $this->key = md5(serialize(gettimeofday)); + $this->fn_tex = $this->_tmpname($this->key.'.tex'); + $this->fn_pdf = $this->_tmpname($this->key.'.pdf'); + $this->template_dir= realpath(str_replace('{TEMPLATE-NAME}', $this->template_name,TEXRENDER_TEMPLATE_DIR)); + $this->fn_template_main = $this->template_dir.'/invoice/main.texi'; + $this->fn_template_item = $this->template_dir.'/invoice/item.texi'; + + $inc = $this->template_dir.'/config.php'; + if (!include($inc)) + throw new Exception("could not load config: $inc"); + + if (!is_array($this->config = $tex_template_config)) + throw new Exception("missing template config"); + + if (!$this->config{'lang'}) + throw new Exception("language not set in template config"); + } + + function addData($par) + { + foreach($par as $walk => $cur) + $this->data{$walk} = $cur; + } + + function checkProductItem($item) + { + if (!$item{'name'}) + throw new Exception("missing item name"); + if (!$item{'amount'}) + throw new Exception("missing amount"); + if (!is_numeric($item{'amount'})) + throw new Exception("amount must be numeric"); + if (!$item{'price'}) + throw new Exception("missing price"); + if (!is_numeric($item{'price'})) + throw new Exception("price must be numeric"); + if (($item{'discount'})&&($item{'discount'} != 0)) + throw new Exception("discount not supported yet by this renderer"); + if (!is_numeric($item{'tax_percent'})) + throw new Exception("tax_percent must be numeric"); + } + + function checkData() + { + if ((!is_array($this->_product_items)) || + (!count($this->_product_items))) + throw new Exception("no product items"); + + if (!$this->data{'ident'}) + throw new Exception("missing ident"); + } + + /* public */ function addProductItem($item) + { + // check for correct items + $this->checkProductItem($item); + + // calculate some stuff if necessary + if (!$item{'total'}) + $item{'total'} = $item{'price'} * $item{'amount'}; + if (!$item{'taxes'}) + $item{'taxes'} = $item{'total'} * $item{'tax_percent'}; + if (!$item{'topay'}) + $item{'topay'} = $item{'total'} + $item{'taxes'}; + + $this->_product_items[] = $item; + } + + /* public String */ function getOutputContentType() + { + return 'application/pdf'; + } + + /* private String */ function _generate_tex() + { + if (!($tmpl_main = implode('',file($this->fn_template_main)))) + throw new Exception("could not load main template: ".$this->fn_template_main); + if (!($tmpl_item = implode('',file($this->fn_template_item)))) + throw new Exception("could not load item template: ".$this->fn_template_item); + + // generate the item list + foreach ($this->_product_items as $walk => $cur) + { + $items .= + str_replace('::Item:Name::', $cur{'name'}, + str_replace('::Item:Price::', TexEncode::money($cur{'price'}), + str_replace('::Item:Amount::', $cur{'amount'}, + str_replace('::Item:Taxrate::', $cur{'tax_percent'}, + str_replace('::Item:Description::', $cur{'description'}, + str_replace('::Item:Comment::', trim($cur{'comment'}), + str_replace('::Item:Discount::', TexEncode::money($cur{'discount'}), + str_replace('::Item:Total::', TexEncode::money($cur{'total'}), + str_replace('::Item:Taxes::', TexEncode::money($cur{'taxes'}), + str_replace('::Item:Topay::', TexEncode::money($cur{'topay'}), + $tmpl_item)))))))))); + + $all_total += $cur{'total'}; + $all_taxes += $cur{'taxes'}; + $all_topay += $cur{'topay'}; + } + + $content = + str_replace('::TemplateDir::', $this->template_dir, + str_replace('::Items::', $items, + str_replace('::Bill:Ident::', $this->data{'ident'}, + str_replace('::Bill:Total::', TexEncode::money($all_total), + str_replace('::Bill:Taxes::', TexEncode::money($all_taxes), + str_replace('::Bill:Topay::', TexEncode::money($all_topay), + str_replace('::Company:Addr:Street::', $this->data{'company:addr:street'}, + str_replace('::Company:Addr:PCode::', $this->data{'company:addr:pcode'}, + str_replace('::Company:Addr:City::', $this->data{'company:addr:city'}, + str_replace('::Company:Addr:Country::', $this->data{'company:addr:country'}, + str_replace('::Company:Addr:State::', $this->data{'company:addr:state'}, + str_replace('::Company:Phone::', $this->data{'company:phone'}, + str_replace('::Company:Fax::', $this->data{'company:fax'}, + str_replace('::Company:Website::', $this->data{'company:website'}, + str_replace('::Customer:Name::', $this->data{'customer:name'}, + str_replace('::Customer:Addr:Street::', TexEncode::text($this->data{'billing:addr:street'}), + str_replace('::Customer:Addr:PCode::', TexEncode::text($this->data{'billing:addr:pcode'}), + str_replace('::Customer:Addr:City::', TexEncode::text($this->data{'billing:addr:city'}), + str_replace('::Customer:Addr:State::', TexEncode::text($this->data{'billing:addr:state'}), + str_replace('::Customer:Addr:Country::', TexEncode::text($this->data{'billing:addr:country'}), + $tmpl_main)))))))))))))))))))); + + return $content; + } + + /* public */ function generate() + { + $this->checkData(); + $tex = $this->_generate_tex(); + @unlink($this->fn_tex); + if (!($fp_tex = fopen($this->fn_tex,"w"))) + throw new Exception("could not open tex source file: ".$this->fn_tex); + + fputs($fp_tex,$tex); + fclose($fp_tex); + + $cmd = 'cd '.dirname($this->fn_tex).' && pdflatex '.$this->fn_tex; + `$cmd` ; `$cmd` ; // call it twice for table calculations + } + + // send appropriate http headers and output file + /* public */ function sendHTTPOutput() + { + $this->generate(); + Header("Content-Type: ".$this->getOutputContentType()); + readfile($this->fn_pdf); + } +} -------------- next part -------------- diff -ruN htdocs.orig/modules/Invoice/CreatePDF.php htdocs/modules/Invoice/CreatePDF.php --- htdocs.orig/modules/Invoice/CreatePDF.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Invoice/CreatePDF.php 2007-05-10 15:30:08.000000000 +0200 @@ -9,67 +9,36 @@ * ********************************************************************************/ - -require_once('include/fpdf/pdf.php'); -require_once('include/fpdf/pdfconfig.php'); require_once('modules/Invoice/Invoice.php'); require_once('modules/Organization/Organization.php'); require_once('include/database/PearDatabase.php'); require_once('include/utils/EditViewUtils.php'); +require_once('lib/render/RenderFactory.php'); -global $adb,$app_strings,$focus; -global $log; - -// for template checking ... -$tmpl_dirs = array( "firstpage", "pages", "lastpage"); -$tmpl_files = array( "header.php", "body.php", "footer.php"); +global $adb,$app_strings,$focus,$log; $sql="select currency_symbol from vtiger_currency_info"; $result = $adb->query($sql); $currency_symbol = $adb->query_result($result,0,'currency_symbol'); -// would you like and end page? 1 for yes 0 for no -$endpage="1"; - $id = $_REQUEST['record']; //retreiving the vtiger_invoice info $focus = new Invoice(); $focus->retrieve_entity_info($_REQUEST['record'],"Invoice"); -$account_name = getAccountName($focus->column_fields[account_id]); -$invoice_no = $focus->column_fields[invoice_no]; // **************** BEGIN POPULATE DATA ******************** - -// populate data if($focus->column_fields["salesorder_id"] != '') $so_name = getSoName($focus->column_fields["salesorder_id"]); else $so_name = ''; $po_name = $focus->column_fields["purchaseorder"]; -$valid_till = $focus->column_fields["duedate"]; -$valid_till = getDisplayDate($valid_till); -$bill_street = $focus->column_fields["bill_street"]; -$bill_city = $focus->column_fields["bill_city"]; -$bill_state = $focus->column_fields["bill_state"]; -$bill_code = $focus->column_fields["bill_code"]; -$bill_country = $focus->column_fields["bill_country"]; - -$contact_name =getContactName($focus->column_fields["contact_id"]); -$ship_street = $focus->column_fields["ship_street"]; -$ship_city = $focus->column_fields["ship_city"]; -$ship_state = $focus->column_fields["ship_state"]; -$ship_code = $focus->column_fields["ship_code"]; -$ship_country = $focus->column_fields["ship_country"]; - -$conditions = from_html($focus->column_fields["terms_conditions"]); -$description = from_html($focus->column_fields["description"]); -$status = $focus->column_fields["invoicestatus"]; - // Company information -$crmid = $focus->column_fields["record_id"]; +if (!($crmid = $focus->column_fields["record_id"])) + throw new Exception("crmid is null/empty"); + $org_query = "select organizationname from vtiger_entity2org where crmid='".$crmid."'"; $result = $adb->query($org_query); $org_rows = $adb->num_rows($result); @@ -82,7 +51,7 @@ $org_name = $adb->query_result($result,0,"organizationname"); } else { $log->info( $module. " '".$crmid."' not assigned to any organization"); - exit(); + throw new Exception("crmid $crmid not assigned to any organisation (org_name=$org_name)"); } // get organization/orgunit details @@ -92,68 +61,11 @@ $log->debug( "Here we are: getOrgUnits( $organization, $orgunitid);"); $orgunittab = getOrgUnits( $organization, $orgunitid); -if( is_array( $orgunittab[$orgunitid])) { - $orgdetails = $orgunittab[$orgunitid]; - $org_name = $orgdetails["name"]; - $org_address = $orgdetails["address"]; - $org_city = $orgdetails["city"]; - $org_state = $orgdetails["state"]; - $org_country = $orgdetails["country"]; - $org_code = $orgdetails["code"]; - $org_phone = $orgdetails["phone"]; - $org_fax = $orgdetails["fax"]; - $org_website = $orgdetails["website"]; - $logo_name = $orgdetails["logoname"]; - $template = $orgdetails["invoice_template"]; -} else { - $log->info( $module. " '".$crmid."' organization/orgunitid mismatch"); - exit(); -} - -// Check the template -if( $template == "") - $template = "Default"; - -if( $template != "Default") { - foreach( $tmpl_dirs as $dir) { - foreach( $tmpl_files as $file) { - if( !file_exists( "modules/".$module."/pdf_templates/".$template."/".$dir."/".$file)) { - $log->info( $module. " '".$crmid."' organization/orgunitid template '".$template."' is incomplete"); - $log->info("Missing file: modules/".$module."/pdf_templates/".$template."/".$dir."/".$file); - $log->info("Fallback to the Default template"); - $template = "Default"; - break 2; - } - } - } -} -//NOTE : Removed currency symbols and added with Grand Total text. it is enough to show the currency symbol in one place - -//we can also get the NetTotal, Final Discount Amount/Percent, Adjustment and GrandTotal from the array $associated_products[1]['final_details'] - -//getting the Net Total -$price_subtotal = number_format($focus->column_fields["hdnSubTotal"],2,'.',','); - -//Final discount amount/percentage -$discount_amount = $focus->column_fields["hdnDiscountAmount"]; -$discount_percent = $focus->column_fields["hdnDiscountPercent"]; - -if($discount_amount != "") - $price_discount = number_format($discount_amount,2,'.',','); -else if($discount_percent != "") -{ - //This will be displayed near Discount label - used in include/fpdf/templates/body.php - $final_price_discount_percent = "(".number_format($discount_percent,2,'.',',')." %)"; - $price_discount = number_format((($discount_percent*$focus->column_fields["hdnSubTotal"])/100),2,'.',','); -} -else - $price_discount = "0.00"; - -//Adjustment -$price_adjustment = number_format($focus->column_fields["txtAdjustment"],2,'.',','); -//Grand Total -$price_total = number_format($focus->column_fields["hdnGrandTotal"],2,'.',','); +if(!is_array( $orgunittab[$orgunitid])) + throw new Exception("org/orgunitid mismatch"); +$orgdetails = $orgunittab[$orgunitid]; +$template = $orgdetails["invoice_template"]; //get the Associated Products for this Invoice $focus->id = $focus->column_fields["record_id"]; @@ -166,6 +78,8 @@ //To calculate the group tax amount if($final_details['taxtype'] == 'group') { + throw new Exception("group tax not supported"); + $group_tax_total = $final_details['tax_totalamount']; $price_salestax = number_format($group_tax_total,2,'.',','); @@ -191,47 +105,37 @@ $sh_tax_amount = $final_details['shtax_totalamount']; $price_shipping_tax = number_format($sh_tax_amount,2,'.',','); +$render = RenderFactory::getRenderer_Invoice(array +( + format => 'application/pdf', + engine => 'pdflatex', + template => 'default' +)); //This is to get all prodcut details as row basis -for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++) +for($i=1;$i<=$num_products;$i++) { - $product_name[$i] = $associated_products[$i]['productName'.$i]; - $prod_description[$i] = $associated_products[$i]['productDescription'.$i]; - $product_id[$i] = $associated_products[$i]['hdnProductId'.$i]; - $qty[$i] = $associated_products[$i]['qty'.$i]; - $unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',','); - $list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',','); - $list_pricet[$i] = $associated_products[$i]['listPrice'.$i]; - $discount_total[$i] = $associated_products[$i]['discountTotal'.$i]; - //aded for 5.0.3 pdf changes - $product_code[$i] = $associated_products[$i]['hdnProductcode'.$i]; - - $taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i]; - - $producttotal = $taxable_total; - $total_taxes = '0.00'; if($focus->column_fields["hdnTaxType"] == "individual") { - $total_tax_percent = '0.00'; - //This loop is to get all tax percentage and then calculate the total of all taxes - for($tax_count=0;$tax_countaddProductItem(array + ( + code => $associated_products[$i]['hdnProductcode'.$i], + name => $associated_products[$i]['productName'.$i], + amount => $associated_products[$i]['qty'.$i], + price => $associated_products[$i]['listPrice'.$i], + unit_price => $associated_products[$i]['unitPrice'.$i], + discount => $associated_products[$i]['discountTotal'.$i], + tax_percent => (integer)($tax_percent)/100, + description => $associated_products[$i]['productDescription'.$i], + comment => $associated_products[$i]['comment'.$i] + )); // Product piecelists $query = "SELECT vtiger_crmentity.crmid, @@ -245,86 +149,46 @@ INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid WHERE vtiger_crmentity.deleted = 0 - AND vtiger_products2products_rel.productid = ".$product_id[$i]." + AND vtiger_products2products_rel.productid = ".$product_id." AND vtiger_products2products_rel.relation_type = 10"; $result = $adb->query($query); $pieces = $adb->num_rows($result); if( $pieces > 0) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = "consisting of:"; - $product_line[$j]["Qty"] = ""; - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - for( $pl=0; $pl<$pieces; $pl++) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = - $adb->query_result( $result, $pl, "productname"); - $product_line[$j]["Qty"] = - $adb->query_result( $result, $pl, "quantity"); - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - } + throw new Exception("multiple pieces not yet supported !"); } } -//echo '
Product Details ==>';print_r($product_line);echo '
'; -//echo '
';print_r($associated_products);echo '
'; - // ************************ END POPULATE DATA ***************************8 -$page_num='1'; -$pdf = new PDF( 'P', 'mm', 'A4' ); -$pdf->Open(); - -$num_pages=ceil(count($product_line)/$products_per_page); - - -$current_product=0; -for($l=0;$l<$num_pages;$l++) -{ - $line=array(); - if($num_pages == $page_num) - $lastpage=1; - - while($current_product != $page_num*$products_per_page) - { - $line[]=$product_line[$current_product]; - $current_product++; - } - - //if bottom > 145 then we skip the Description and T&C in every - //page and display only in lastpage - //if you want to display the description and T&C in each page then - //set the display_desc_tc='true' and bottom <= 145 in pdfconfig.php - $pdf->AddPage(); - if( $page_num == "1") { - include("pdf_templates/".$template."/firstpage/header.php"); - include("pdf_templates/".$template."/firstpage/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/firstpage/footer.php"); - } else { - include("pdf_templates/".$template."/pages/header.php"); - include("pdf_templates/".$template."/pages/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/pages/footer.php"); - } - - $page_num++; - - if (($endpage) && ($lastpage)) - { - $pdf->AddPage(); - include("pdf_templates/".$template."/lastpage/header.php"); - include("pdf_templates/".$template."/lastpage/body.php"); - include("pdf_templates/".$template."/lastpage/footer.php"); - } -} - - -$pdf->Output('Invoice-'.$crmid.'.pdf','D'); //added file name to make it work in IE, also forces the download giving the user the option to save +$render->addData(array +( + 'valid_until' => $focus->column_fields["duedate"], + 'description' => from_html($focus->column_fields["description"]), + 'conditions' => from_html($focus->column_fields["terms_conditions"]), + 'tax_type' => $focus->column_fields['hdnTaxType'], + 'ident' => $focus->column_fields['invoice_no'], + 'contact:name' => getContactName($focus->column_fields["contact_id"]), + 'company:name' => $orgdetails["name"], + 'company:addr:city' => $orgdetails["city"], + 'company:addr:pcode' => $orgdetails["code"], + 'company:addr:street' => $orgdetails["address"], + 'company:addr:country' => $orgdetails["country"], + 'company:addr:state' => $orgdetails["state"], + 'company:phone' => $orgdetails["phone"], + 'company:fax' => $orgdetails["fax"], + 'company:website' => $orgdetails["website"], + 'customer:name' => getAccountName($focus->column_fields[account_id]), + 'shipping:addr:city' => $focus->column_fields["ship_city"], + 'shipping:addr:pcode' => $focus->column_fields["ship_code"], + 'shipping:addr:street' => $focus->column_fields["ship_street"], + 'shipping:addr:country' => $ship_country = $focus->column_fields["ship_country"], + 'shipping:addr:state' => $focus->column_fields["ship_state"], + 'billing:addr:city' => $focus->column_fields["bill_city"], + 'billing:addr:pcode' => $focus->column_fields["bill_code"], + 'billing:addr:street' => $focus->column_fields["bill_street"], + 'billing:addr:country' => $focus->column_fields["bill_country"], + 'billing:addr:state' => $focus->column_fields["bill_state"] +)); -// Added to fix annoying bug that includes HTML in your PDF +$render->sendHTTPOutput(); exit(); -?> -------------- next part -------------- diff -ruN htdocs.orig/templates/tex/default/config.php htdocs/templates/tex/default/config.php --- htdocs.orig/templates/tex/default/config.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/config.php 2007-05-09 20:00:54.000000000 +0200 @@ -0,0 +1,7 @@ + 'de', + 'tex2pdf' => 'pdflatex' +); diff -ruN htdocs.orig/templates/tex/default/invoice/item.texi htdocs/templates/tex/default/invoice/item.texi --- htdocs.orig/templates/tex/default/invoice/item.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/item.texi 2007-05-10 14:25:30.000000000 +0200 @@ -0,0 +1,2 @@ +::Item:Name:: \ifempty{::Item:Comment::}{}{(::Item:Comment::)} & ::Item:Price:: \Euro & ::Item:Amount:: & ::Item:Total:: \Euro \\ +\hline diff -ruN htdocs.orig/templates/tex/default/invoice/main.texi htdocs/templates/tex/default/invoice/main.texi --- htdocs.orig/templates/tex/default/invoice/main.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/main.texi 2007-05-10 14:15:53.000000000 +0200 @@ -0,0 +1,53 @@ +\def\ResourcePrefix{::TemplateDir::/resource} +\input \ResourcePrefix/bill.tex + +\def\ifempty#1#2#3{\def\inner{#1}\ifx\inner\empty + #2\else #3\fi } + +\begin{document} + \letterInit + \begin{letter}{% + ::Customer:Addr:Street:: \ \\ + ::Customer:Addr:PCode::\ ::Customer:Addr:City:: \ \\ + \ \\[\medskipamount] + } + + \opening{\Large Ihre Rechnung:\normalsize~~~ ::Bill:Ident:: +%% ~~~~~~~~~~vom:~~::BillDate:: + } + + \setlength\LTleft{0pt} + \setlength\LTright{72pt} + \begin{longtable}{|p{300pt}|r|r|r|} + \hline + Leistung & Preis & Menge & Summe \\ + \hline + \endhead + \hline + \hline + \multicolumn{3}{|l|}{Rechnungsbetrag} & ::Bill:Total:: \Euro \\ + \hline + \multicolumn{3}{|l|}{Umsatzsteuer} & ::Bill:Taxes:: \Euro \\ + \hline + \hline + \multicolumn{3}{|l|}{Gesamt} & ::Bill:Topay:: \Euro \\ + \hline + \noalign{ + \vspace{12pt} + \small + Soweit nicht anders angegeben entspricht das Lieferdatum + dem Rechnungsdatum + } + \noalign{ + \vspace{12pt} + \normalsize + Bitte {\"u}berweisen Sie den f{\"a}lligen Betrag binnen + 10~Tagen auf eines unserer Konten. \newline + Die Ware bleibt bis zur vollst{\"a}ndigen Bezahlung Eigentum + von metux IT service. + } + \endlastfoot + ::Items:: + \end{longtable} + \end{letter} +\end{document} diff -ruN htdocs.orig/templates/tex/default/resource/bill.tex htdocs/templates/tex/default/resource/bill.tex --- htdocs.orig/templates/tex/default/resource/bill.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/bill.tex 2007-05-09 23:55:35.000000000 +0200 @@ -0,0 +1,22 @@ +\input{\ResourcePrefix/metux.tex} + +\documentclass[a4paper,bottom=0cm,fromalign=center,fromlogo=true]{scrlttr2} +\usepackage{epsfig} +\usepackage{longtable} + +\usepackage{ngerman} +\usepackage[latin1]{inputenc} +%usepackage{fancyhdr} +%pagestyle{fancy} + +% brief-init +\newcommand\letterInit{% + \captionsgerman + \dategerman + \firsthead{\metuxHeader} + \firstfoot{\metuxFooter} + \setkomavar{fromname}{metux IT service} + \setkomavar{fromaddress}{Heydaer Stra{\ss}e 23, 99338 Plaue} +} + +\newcommand\Euro{Euro} diff -ruN htdocs.orig/templates/tex/default/resource/header.eps htdocs/templates/tex/default/resource/header.eps --- htdocs.orig/templates/tex/default/resource/header.eps 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.eps 2002-09-17 01:45:21.000000000 +0200 @@ -0,0 +1,178 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: header.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3d +%%CreationDate: Tue Jul 30 18:35:09 2002 +%%For: ems at nibiru.metux.de () +%%BoundingBox: 0 0 643 88 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 88 moveto 0 0 lineto 643 0 lineto 643 88 lineto closepath clip newpath +-4.5 96.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/reencdict 12 dict def /ReEncode { reencdict begin +/newcodesandnames exch def /newfontname exch def /basefontname exch def +/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def +basefontdict { exch dup /FID ne { dup /Encoding eq +{ exch dup length array copy newfont 3 1 roll put } +{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall +newfont /FontName newfontname put newcodesandnames aload pop +128 1 255 { newfont /Encoding get exch /.notdef put } for +newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat +newfontname newfont definefont pop end } def +/isovec [ +8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde +8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis +8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron +8#220 /dotlessi 8#230 /oe 8#231 /OE +8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling +8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis +8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot +8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus +8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph +8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine +8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf +8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute +8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring +8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute +8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute +8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve +8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply +8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex +8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave +8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring +8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute +8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute +8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve +8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide +8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex +8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def +/Courier-Bold /Courier-Bold-iso isovec ReEncode +/Times-Bold /Times-Bold-iso isovec ReEncode +/Times-Roman /Times-Roman-iso isovec ReEncode +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +/Times-Roman-iso ff 150.00 scf sf +6600 1200 m +gs 1 -1 sc (www.metux.de) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 825 m +gs 1 -1 sc (+49 36207 51833) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 675 m +gs 1 -1 sc (+49 174 7066481) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 1350 m +gs 1 -1 sc (contact @ metux.de) col8 sh gr +/Courier-Bold-iso ff 180.00 scf sf +1650 750 m +gs 1 -1 sc (Ihr innovativer IT-Dienstleister) col25 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 1200 m +gs 1 -1 sc ( Internet) col0 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 675 m +gs 1 -1 sc ( Telephon) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1350 m +gs 1 -1 sc (Advance Bank \(BLZ 702 300 00\), Kto-Nr: 200 72 64 206) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1575 m +gs 1 -1 sc (Enrico Weigelt, Steuer-Nr: 154/286/05931) col8 sh gr +/Times-Bold-iso ff 300.00 scf sf +75 750 m +gs 1 -1 sc (metux ITS) col9 sh gr +/Courier-Bold-iso ff 150.00 scf sf +150 1350 m +gs 1 -1 sc (Bankverbindung:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +750 1575 m +gs 1 -1 sc (Inhaber:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +225 1125 m +gs 1 -1 sc (Hausanschrift:) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1125 m +gs 1 -1 sc (Heydaer Strasse 23 99338 Plaue) col8 sh gr +/Times-Roman-iso ff 180.00 scf sf +10125 300 m +gs 1 -1 sc (tricktext) col0 sh gr +$F2psEnd +rs diff -ruN htdocs.orig/templates/tex/default/resource/header.fig htdocs/templates/tex/default/resource/header.fig --- htdocs.orig/templates/tex/default/resource/header.fig 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.fig 2002-09-17 01:44:26.000000000 +0200 @@ -0,0 +1,24 @@ +#FIG 3.2 +Landscape +Center +Inches +A4 +100.00 +Single +-2 +1200 2 +4 0 0 893 -1 14 10 -0.0000 4 135 1350 150 1350 Bankverbindung:\001 +4 0 0 890 -1 14 10 -0.0000 4 105 1260 225 1125 Hausanschrift:\001 +4 0 9 918 -1 2 20 0.0000 4 150 1005 75 750 metux ITS\001 +4 0 25 969 -1 14 12 -0.0000 4 135 3360 1650 750 Ihr innovativer IT-Dienstleister\001 +4 0 0 942 -1 2 10 0.0000 4 135 750 5700 675 Telephon\001 +4 0 8 991 -1 0 10 0.0000 4 105 1050 6600 675 +49 174 7066481\001 +4 0 8 997 -1 0 10 0.0000 4 105 1050 6600 825 +49 36207 51833\001 +4 0 8 999 -1 0 10 0.0000 4 105 990 6600 1200 www.metux.de\001 +4 0 0 946 -1 2 10 0.0000 4 105 765 5700 1200 Internet\001 +4 0 8 888 -1 0 10 0.0000 4 135 1935 1650 1125 Heydaer Strasse 23 99338 Plaue\001 +4 0 8 987 -1 0 10 0.0000 4 135 1230 6600 1350 contact @ metux.de\001 +4 0 8 933 -1 0 10 0.0000 4 135 3435 1650 1350 Advance Bank (BLZ 702 300 00), Kto-Nr: 200 72 64 206\001 +4 0 0 50 0 0 12 0.0000 4 135 645 10125 300 tricktext\001 +4 0 0 893 -1 14 10 0.0000 4 105 720 750 1575 Inhaber:\001 +4 0 8 933 -1 0 10 0.0000 4 135 2415 1650 1575 Enrico Weigelt, Steuer-Nr: 154/286/05931\001 diff -ruN htdocs.orig/templates/tex/default/resource/metux.tex htdocs/templates/tex/default/resource/metux.tex --- htdocs.orig/templates/tex/default/resource/metux.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/metux.tex 2007-05-09 23:56:59.000000000 +0200 @@ -0,0 +1,76 @@ +% Variablen .... % +\def\metuxSignature{\epsfig{file=\ResourcePrefix/signature.png}} +\def\metuxName{metux IT service} +\def\metuxPhone{+49-36207-519931} +\def\metuxFax{+49-36207-519932} +\def\metuxEmail{weigelt at metux.de} +\def\metuxUrl{www.metux.de} +\def\metuxAddress{Heydaer Stra{\ss}e 23, 99338 Plaue} +\def\metuxBankAccount{0972596900} +\def\metuxBankCompany{Dresdner Bank AG} +\def\metuxBankCode{82080000} +\def\metuxBank{Kto: \metuxBankAccount, BLZ: \metuxBankCode, \metuxBankCompany} +\def\metuxStrnr{154/286/05931} +\def\metuxOwner{Enrico Weigelt} + +\def\nl{\ \\} +\def\metuxGeomLeft{2cm} +\def\metuxGeomRight{2cm} +\def\metuxGeomBottom{1cm} +\def\metuxGeomHead{1cm} +\def\metuxGeomTop{0.5cm} + +\newcommand\metuxFooter +{ + \hrule + ~\newline + \parbox[l]{180pt}{ + \small + \metuxName \\ + Inh. \metuxOwner \\ + \metuxAddress \\ + StNr: \metuxStrnr + } + \parbox[l]{180pt}{ + \small + Bankverbindung: \\ + Kto: \metuxBankAccount \\ + BLZ: \metuxBankCode \\ + \metuxBankCompany + } + \parbox[l]{180pt}{ + \small + Tel: \metuxPhone \\ + Fax: \metuxFax \\ + eMail: \metuxEmail \\ + WWW: \metuxUrl + } +} + +\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.png}} +%\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.eps}} +\newcommand\metuxInit{ + \renewcommand{\headrulewidth}{0.5pt} + \renewcommand{\footrulewidth}{0.5pt} + \cfoot{\metuxFooter} + \chead{\metuxHeader} +} + +% \newcommand\Euro{Euro} + +\def\metuxMFG{% + \noindent Mit freundlichem Gru\ss + + \epsfig{\metuxSignature} + + \noindent Enrico Weigelt \\ + metux IT service +} + +\def\metuxMFGpriv{% + \noindent Mit freundlichem Gru\ss + + \metuxSignature + + \noindent Enrico Weigelt +} From amvandemore at gmail.com Thu May 10 12:59:44 2007 From: amvandemore at gmail.com (Adam Vande More) Date: Thu, 10 May 2007 14:59:44 -0500 Subject: [Vtigercrm-developers] Custom Integration with website Message-ID: <6201873e0705101259w1eb599d0xd5fcbb0916cb546c@mail.gmail.com> I have written our contact us page to insert the customer's information directly into vtiger as a lead. I am aware that the webforms add on does the same thing but I elected to write my own script. The script inserts data into tables: vtiger_crmentity vtiger_leaddetails vtiger_leadaddress vtiger_leadscf vtiger_leadsubdetails vtiger_crmentity_seq - increments the value In testing this appears to work just fine, however it occurs to me that I may have missed some possible constraints in the db that could result in data integrity issues if i didn't do this correctly. Are there any other tables that should be updated or any other areas I should be worried about? Also the webforms source seems exceedingly complex for a relatively simple task and it's too abstracted for me to be able to read easily. I'm not sure if it's doing checks that I should implement too. Does anyone have any insight into this? -- Adam Vande More Systems Administrator Mobility Sales -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/6318a0f8/attachment.html From weigelt at metux.de Thu May 10 17:13:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 02:13:35 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() Message-ID: <20070511001335.GA5640@nibiru.local> Hi folks, as we sometimes get some errors like: # Fatal error: Call to a member function Move() on a non-object # in .../include/database/PearDatabase.php on line 443 Obviously sometimes the query_result() method is called with an non-existing result object. This patch adds an check which throws an exception on missing result object, so we can easily track it down. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 @@ -438,6 +438,8 @@ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); + if (!is_object($result)) + throw new Exception("result is not an object"); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); From jorge.torres.maldonado at gmail.com Thu May 10 17:31:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Thu, 10 May 2007 20:31:24 -0400 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <530c7d700705101731q8704acw53e1e2f0e7bfc03f@mail.gmail.com> THis one I like, thank you very much On 5/10/07, Enrico Weigelt wrote: > > > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/152bcf4f/attachment.htm From weigelt at metux.de Thu May 10 18:13:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:13:10 +0200 Subject: [Vtigercrm-developers] [PATCH] some new $adb (PearDatabase) methods Message-ID: <20070511011310.GA19509@nibiru.local> Hi folks, this patch adds two new functions to the PearDatabase ($adb) class: * sql_concat(array): generates an sql expression for field concatenations, based on selected RDBMS. * run_query_field(string): executes an given SQL query and returns only the first field of the first record. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-11 02:17:06.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 02:55:29.000000000 +0200 @@ -434,6 +434,31 @@ return $this->change_key_case($result->FetchRow()); } + function sql_concat($list) + { + switch ($this->dbType) + { + case 'mysql': + return 'concat('.implode(',',$list).')'; + case 'pgsql': + return '('.implode('||',$list).')'; + default: + throw new Exception("unsupported dbtype \"".$this->dbType."\""); + } + } + + function run_query_field($sql) + { + $this->checkConnection(); + $result = $this->database->Execute($sql); + + if (!is_object($result)) + throw new Exception("query failed: $sql"); + + $row = $result->FetchRow(); + return array_shift($row); + } + /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { From weigelt at metux.de Thu May 10 18:32:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:32:07 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) Message-ID: <20070511013207.GB19509@nibiru.local> Hi folks, the leads module (Tracker.php) suffers from an sql bug: it uses mysql specific sql statements for concatenating fields. This ends up in empty result objects and so the already mentioned error of trying to call Move() on non-object. This patch solves this by using the new PearDatabas::sql_concat() function (see prev. patch) for creating the statement. Also this patch calls the new PearDatabase::run_query_field() for the one-field-query. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 @@ -80,18 +80,23 @@ $entityidfield = $adb->query_result($result,0,'entityidfield'); if(!(strpos($fieldsname,',') === false)) { - $fieldlists = explode(',',$fieldsname); - $fieldsname = "concat("; - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); - $fieldsname = $fieldsname.")"; + // concatenate multiple fields with an whitespace between them + $fieldlists = explode(',',$fieldsname); + $fl = array(); + foreach($fieldlists as $w => $c) + { + if (count($fl)) + $fl[] = "' '"; + $fl[] = $c; + } + $fieldsname = $adb->sql_concat($fl); } if($current_module =='Organization') { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; } else { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; } - $result = $adb->query($query1); - $item_summary = $adb->query_result($result,0,'entityname'); + $item_summary = $adb->run_query_field($query1); } ### Check database item sizes From jens at Strawberry.COM Fri May 11 00:36:01 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 09:36:01 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) In-Reply-To: <20070511013207.GB19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 03:32:07AM +0200 References: <20070511013207.GB19509@nibiru.local> Message-ID: <20070511093601.A14681@Strawberry.COM> Hi, my Postgres patches already introduced a stored procedure which handles concats in Postgres. This is IMHO mor performant. Jens On Fri, May 11, 2007 at 03:32:07AM +0200, Enrico Weigelt wrote: > > Hi folks, > > > the leads module (Tracker.php) suffers from an sql bug: it uses > mysql specific sql statements for concatenating fields. This ends > up in empty result objects and so the already mentioned error > of trying to call Move() on non-object. > > This patch solves this by using the new PearDatabas::sql_concat() > function (see prev. patch) for creating the statement. > > Also this patch calls the new PearDatabase::run_query_field() > for the one-field-query. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php > --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 > @@ -80,18 +80,23 @@ > $entityidfield = $adb->query_result($result,0,'entityidfield'); > if(!(strpos($fieldsname,',') === false)) > { > - $fieldlists = explode(',',$fieldsname); > - $fieldsname = "concat("; > - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); > - $fieldsname = $fieldsname.")"; > + // concatenate multiple fields with an whitespace between them > + $fieldlists = explode(',',$fieldsname); > + $fl = array(); > + foreach($fieldlists as $w => $c) > + { > + if (count($fl)) > + $fl[] = "' '"; > + $fl[] = $c; > + } > + $fieldsname = $adb->sql_concat($fl); > } > if($current_module =='Organization') { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; > } else { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; > } > - $result = $adb->query($query1); > - $item_summary = $adb->query_result($result,0,'entityname'); > + $item_summary = $adb->run_query_field($query1); > } > > ### Check database item sizes > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From philip at vtiger.com Fri May 11 03:29:36 2007 From: philip at vtiger.com (Philip) Date: Fri, 11 May 2007 15:59:36 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <46444590.1040501@vtiger.com> Hi Enrico, When tested the code i had the following exception thrown in the screen. *Fatal error*: Uncaught exception 'Exception' with message 'given result set is not an object' in /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 Stack trace: #0 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): PearDatabase->query_result(false, 0, 'count') #1 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): include('/home/crm-test3...') #2 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): require_once('/home/crm-test3...') #3 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): require_once('/home/crm-test3...') #4 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): include('/home/crm-test3...') #5 {main} thrown in */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* on line *442 *So where should i catch this exception. Regards, Philip Enrico Weigelt wrote: > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > > ------------------------------------------------------------------------ > > diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php > --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 > @@ -438,6 +438,8 @@ > function query_result(&$result, $row, $col=0) > { > //$this->println("ADODB query_result r=".$row." c=".$col); > + if (!is_object($result)) > + throw new Exception("result is not an object"); > $result->Move($row); > $rowdata = $this->change_key_case($result->FetchRow()); > //$this->println($rowdata); > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Fri May 11 06:57:17 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 15:57:17 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <46444590.1040501@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> Message-ID: <20070511135717.GD19509@nibiru.local> * Philip schrieb: Hi, > When tested the code i had the following exception thrown in the screen. > > *Fatal error*: Uncaught exception 'Exception' with message 'given result > set is not an object' in > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 > Stack trace: #0 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): > PearDatabase->query_result(false, 0, 'count') #1 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): > include('/home/crm-test3...') #2 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): > require_once('/home/crm-test3...') #3 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): > require_once('/home/crm-test3...') #4 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): > include('/home/crm-test3...') #5 {main} thrown in > */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* > on line *442 Looks like an bug in Potentials/ListView.php. Probably an query failed and so $result is empty. We've lots of such issues everywhere :( cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 07:38:26 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:38:26 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers Message-ID: <20070511143826.GF19509@nibiru.local> Hi folks, is it possible (by the db schema) to change invoice numbers ? I don't like the automatic numbering very much and like to change the numbers. I suspect similar trouble as w/ the org/company name ;-O cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 07:46:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:46:44 +0200 Subject: [Vtigercrm-developers] Sending invoice via email Message-ID: <20070511144644.GG19509@nibiru.local> Hi folks, I'm looking for an function to send invoices automatically via eMail. Is there already such an function or should I implement it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 07:57:14 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:57:14 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" Message-ID: <20070511145714.GH19509@nibiru.local> Hi folks, could anyone please explain what the invoice status "credited invoice" actually means ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Fri May 11 08:03:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:03:35 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511143826.GF19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:38:26PM +0200 References: <20070511143826.GF19509@nibiru.local> Message-ID: <20070511170335.A16456@Strawberry.COM> Hi, originally the invoice number was just the CRMEntity ID. As it is for any other entity like quotes, so, ... But: hasn't there been a recent change on that (just invoices)? What about a generic solution to that issue, too? I was already thinking about introducing "ranges of numbers", a table that defines the format of particular numbers, like invoice-numbers, product-numbers etc. Especially for invoices we need some automatism. Some govern- ments - Germany !!! - forces companies to provide an determi- nistic numbering scheme for invoices. So this field cannot be assigned manually to each invoice. jens On Fri, May 11, 2007 at 04:38:26PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > is it possible (by the db schema) to change invoice numbers ? > > I don't like the automatic numbering very much and like to change > the numbers. > > I suspect similar trouble as w/ the org/company name ;-O > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Fri May 11 08:07:02 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:07:02 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511145714.GH19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:57:14PM +0200 References: <20070511145714.GH19509@nibiru.local> Message-ID: <20070511170702.C16456@Strawberry.COM> Eine Stundung? On Fri, May 11, 2007 at 04:57:14PM +0200, Enrico Weigelt wrote: > > Hi folks, > > could anyone please explain what the invoice status > "credited invoice" actually means ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Fri May 11 08:22:25 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:22:25 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511170335.A16456@Strawberry.COM> References: <20070511143826.GF19509@nibiru.local> <20070511170335.A16456@Strawberry.COM> Message-ID: <20070511152225.GI19509@nibiru.local> * Jens Hamisch schrieb: Hi, > originally the invoice number was just the CRMEntity ID. > As it is for any other entity like quotes, so, ... > But: hasn't there been a recent change on that (just invoices)? Ah, I see: The invoice ID is actually an pointer for schema internal references. And that's the source of the problem: internal references should always base on internal object IDs, never on user- visible idents/names. > What about a generic solution to that issue, too? > I was already thinking about introducing "ranges of numbers", > a table that defines the format of particular numbers, like > invoice-numbers, product-numbers etc. Ugh, no. Not for the object references. For such things we have sequences, which produce OIDs (which are in fact just unique numbers). Many things which an user would call "number" are names, not numbers. So ie. for invoice numbers: they're not object ID's, but names. Of course names, which follow certain rules, ie. for automatic allocation, but from the schema's view they're just opaque names, strings, text. > Especially for invoices we need some automatism. Some govern- > ments - Germany !!! - forces companies to provide an determi- > nistic numbering scheme for invoices. So this field cannot be > assigned manually to each invoice. Leave this to the user/admin. It should be clear that the "invoice_no" field cannot be an object id. So the first step is to introduce an separate oid field (fed by some sequence) and let *all* references point on that field. From now on let's call the old invoice_no field an invoice ident. The second step is to implement an customizable scheme for autmatic invoice ident allocation. Maybe put this into an separate class, which can be easily adoped to user's needs. Whether some crm user should be allowed to change the invoice idents is just an permission issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 08:24:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:24:50 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511170702.C16456@Strawberry.COM> References: <20070511145714.GH19509@nibiru.local> <20070511170702.C16456@Strawberry.COM> Message-ID: <20070511152450.GJ19509@nibiru.local> * Jens Hamisch schrieb: switching this thread to german: > Eine Stundung? Ok. Man kann Rechnungen nur komplett stunden ? F?r Ratenzahlung, etc haben wir noch kein Handling ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From fp at crm-now.de Fri May 11 09:27:42 2007 From: fp at crm-now.de (Frank Piepiorra) Date: Fri, 11 May 2007 18:27:42 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: Message-ID: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Enrico, any chance that you post your contribution as files at vtigerForge? Regards, Frank From weigelt at metux.de Fri May 11 11:11:59 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:11:59 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> References: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Message-ID: <20070511181159.GA25485@nibiru.local> * Frank Piepiorra schrieb: Hi, > any chance that you post your contribution as files at vtigerForge? any chance for doing this per command line ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- From gopals at vtiger.com Fri May 11 11:34:35 2007 From: gopals at vtiger.com (Gopal) Date: Sat, 12 May 2007 00:04:35 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511135717.GD19509@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> Message-ID: <4644B73B.70005@vtiger.com> Hi Enrico, Thanks for your suggestions to take vtiger to next level. Please don't hesitate to highlight issues (if any) in various places. In fact Philip has tried to integrate your patch with our 5.0.3 release. However, he is unsuccessful. It will be of great help, if you could spend your valuable time on our forthcoming 5.0.3 release. I am confident, with our community support we can release a better product. Best Regards, Gopal (vtiger Team) Enrico Weigelt wrote: > * Philip schrieb: > > Hi, > > >> When tested the code i had the following exception thrown in the screen. >> >> *Fatal error*: Uncaught exception 'Exception' with message 'given result >> set is not an object' in >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 >> Stack trace: #0 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): >> PearDatabase->query_result(false, 0, 'count') #1 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): >> include('/home/crm-test3...') #2 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): >> require_once('/home/crm-test3...') #3 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): >> require_once('/home/crm-test3...') #4 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): >> include('/home/crm-test3...') #5 {main} thrown in >> */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* >> on line *442 >> > > Looks like an bug in Potentials/ListView.php. > Probably an query failed and so $result is empty. > > We've lots of such issues everywhere :( > > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070512/b5575516/attachment.htm From weigelt at metux.de Fri May 11 11:55:11 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:55:11 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <4644B73B.70005@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> Message-ID: <20070511185511.GB25485@nibiru.local> * Gopal schrieb: Hi, > In fact Philip has tried to integrate your patch with our 5.0.3 > release. However, he is unsuccessful. It will be of great help, if you > could spend your valuable time on our forthcoming 5.0.3 release. I'm entirely working on Jens's 5.1 branch, since I need postgres. IMHO we first should get 5.0.3 and 5.1_jens merged. My patches are divided into two groups: *jens*.diff -> the changes from 5.1_jens to jens' personal tree *nekrad*.diff -> my own changes based on jens' tree. Maybe, in some cases the ordering could be significant (although it *should* not ;-O) Some of my patches *might* also work on 5.0.3, but I didn't check. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From philip at vtiger.com Sun May 13 23:20:29 2007 From: philip at vtiger.com (Philip) Date: Mon, 14 May 2007 11:50:29 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511185511.GB25485@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> <20070511185511.GB25485@nibiru.local> Message-ID: <4647FFAD.3020804@vtiger.com> Hi Enrico, Regarding the patch, to overcome the empty result error you have given the throw exception, function but whenever we use throw exception, we need to use catch function, because of this i got uncaught exception during the patch integration. Does the patch works fine with out caught function in your setup? if not where do we need to include this catch function? Any help would be highly appreciated. Regards, Philip Enrico Weigelt wrote: > * Gopal schrieb: > > Hi, > > >> In fact Philip has tried to integrate your patch with our 5.0.3 >> release. However, he is unsuccessful. It will be of great help, if you >> could spend your valuable time on our forthcoming 5.0.3 release. >> > > I'm entirely working on Jens's 5.1 branch, since I need postgres. > IMHO we first should get 5.0.3 and 5.1_jens merged. > > My patches are divided into two groups: > > *jens*.diff -> the changes from 5.1_jens to jens' personal tree > *nekrad*.diff -> my own changes based on jens' tree. > > Maybe, in some cases the ordering could be significant > (although it *should* not ;-O) > > > Some of my patches *might* also work on 5.0.3, but I didn't check. > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070514/4c27c9ee/attachment.html From anugupta at pu.ac.in Mon May 14 01:59:42 2007 From: anugupta at pu.ac.in (Anu Gupta DCSA) Date: Mon, 14 May 2007 15:29:42 +0630 Subject: [Vtigercrm-developers] A Survey on Defect Management Practices in Free/Open Source Software Message-ID: <20070514085932.M82540@pu.ac.in> Sir/Madam I seek help from designers, developers, testers,defect fixers,project managers or playing any other key role in Free/Open Source software development or maintenence in carrying out a study on practices and problems of defect management in various Free/Open Source Software projects. The insights gained from the study can further help us to extract publicly accessible defect data and determine impact of defect management practices on software quality. Please spend a few minutes of your precious time to fill up the Questionnaire. The most of the questions follow multiple choice formats and are quite easy to answer. To have the Online Questionnaire, please visit: http://anu.puchd.ac.in/phpESP/public/survey.php?name=FOSS_Defect_Survey (You can also copy and paste this link into your browser, and hit the 'Return' key.) I hope you will find all the questions interesting and thought-provoking. Your answers will be kept anonymous.The data thus collected will only be used for research purpose.It would be nice if you may further refer this mail to others actively engaged with Free/Open Source Software development. If you have any query or suggestions then feel free to contact. Thank You With regards, Anu Gupta Senior Lecturer Department of Computer Science and Applications, Panjab University, Chandigarh. INDIA In case of any problem in accessing/using the above mentioned link please contact: E-mail: anugupta at pu.ac.in anugupta98 at gmail.com From joe at tsolucio.com Tue May 15 16:56:04 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 16 May 2007 01:56:04 +0200 Subject: [Vtigercrm-developers] Custom Invoice Number Message-ID: <464A4894.1060001@tsolucio.com> Hi, I have just looked at this code. I believe that this is not the correct way to solve the autoincrement problem Perfectioning the code that already exists in forum/wiki for this you would have had a more complete solution that would serve any module. Instead you have whipped up your own solution which is probably not multi-user safe, you have hardcoded english text into a checkduplicate function which would not be necessary if you were using the database which is already transaction and multiuser safe and you are writing php files with code each time an invoice is made. Have you at all thought about 4-5 people making invoices at a time? Why are you still hardcoding strings in the code? Why not trust the database to avoid overlapping? I mean the database guys have solved this problem a long time ago, who are we to invent a new untested system? As normal you leave aside the community. I know I am becomming a persona non grata here, but somebody has to say these things. If you keep in this line this product is doomed. Joe TSolucio From davidv.net at gmail.com Wed May 16 06:09:47 2007 From: davidv.net at gmail.com (David V.) Date: Wed, 16 May 2007 09:09:47 -0400 Subject: [Vtigercrm-developers] Custom Invoice Number In-Reply-To: <464A4894.1060001@tsolucio.com> References: <464A4894.1060001@tsolucio.com> Message-ID: Joe, You are beeing a bit hard here but thank you for reporting this. I'm also waiting for a better solution for invoices number but I have to admit I did not spend the necessary time to look at the new code in 5.0.3. Thank you. David V. 2007/5/15, Joe Bordes : > Hi, > > I have just looked at this code. > I believe that this is not the correct way to solve the autoincrement > problem > Perfectioning the code that already exists in forum/wiki for this you > would have had a more complete solution that would serve any module. > Instead you have whipped up your own solution which is probably not > multi-user safe, you have hardcoded english text into a checkduplicate > function which would not be necessary if you were using the database > which is already transaction and multiuser safe and you are writing php > files with code each time an invoice is made. > Have you at all thought about 4-5 people making invoices at a time? > Why are you still hardcoding strings in the code? > Why not trust the database to avoid overlapping? I mean the database > guys have solved this problem a long time ago, who are we to invent a > new untested system? > > As normal you leave aside the community. > > I know I am becomming a persona non grata here, but somebody has to say > these things. If you keep in this line this product is doomed. > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From chazarra.clement at gmail.com Mon May 21 06:20:04 2007 From: chazarra.clement at gmail.com (clement chazarra) Date: Mon, 21 May 2007 14:20:04 +0100 Subject: [Vtigercrm-developers] Security focus Message-ID: Hello everybody, I just wanted to point out a little document from drupal community highlighting secure ways to code. http://drupal.org/writing-secure-code My suggestion would even be to add in the wiki a "Security focus" page where we could add the different techniques developers should follow to produce secure code. If at some points the list seems quite complete and up to date, it might be a good idea to schedule a release dedicated on that matter and upgrade the whole code. Other pages in the wiki could be created as well, focusing on different important matters like performance/usability/etc. Byebye Clem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070521/b4c9e07d/attachment.htm From joe at tsolucio.com Mon May 28 08:40:07 2007 From: joe at tsolucio.com (Joe Bordes) Date: Mon, 28 May 2007 17:40:07 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 Message-ID: <1180366807.23252.14.camel@joesunix.int> Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio From aissa at abonlinesolutions.com Mon May 28 08:42:41 2007 From: aissa at abonlinesolutions.com (=?iso-8859-1?B?Qe9zc2E=?=) Date: Mon, 28 May 2007 17:42:41 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <1180366807.23252.14.camel@joesunix.int> References: <1180366807.23252.14.camel@joesunix.int> Message-ID: <000001c7a13e$d4db3ad0$7e91b070$@com> Idem here, it's bizarre. A?ssa ABOnline solutions -----Message d'origine----- De?: Joe Bordes [mailto:joe at tsolucio.com] Envoy??: lundi 28 mai 2007 17:40 ??: vtigercrm-developers at lists.vtigercrm.com Objet?: [Vtigercrm-developers] svn trunk in branches/5.0.3 Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From richie at vtiger.com Mon May 28 14:26:08 2007 From: richie at vtiger.com (richie) Date: Tue, 29 May 2007 02:56:08 +0530 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <000001c7a13e$d4db3ad0$7e91b070$@com> References: <1180366807.23252.14.camel@joesunix.int> <000001c7a13e$d4db3ad0$7e91b070$@com> Message-ID: <465B48F0.1020908@vtiger.com> Yes. Michel jaquemes had checked in the entire application as a separate folder. I have removed it. Pl. try now. Michel: I have revoked your permission to do mischief for now ;-) *Richie* A?ssa wrote: > Idem here, it's bizarre. > A?ssa > ABOnline solutions > > -----Message d'origine----- > De : Joe Bordes [mailto:joe at tsolucio.com] > Envoy? : lundi 28 mai 2007 17:40 > ? : vtigercrm-developers at lists.vtigercrm.com > Objet : [Vtigercrm-developers] svn trunk in branches/5.0.3 > > Hi, > > I just "updated" my svn version and recieved a new "trunk" directory > containing the whole application???? > > Joe > TSolucio > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/cbcb280f/attachment.htm From brian at pr2k.com Tue May 29 19:34:18 2007 From: brian at pr2k.com (Brian Laughlin) Date: Tue, 29 May 2007 19:34:18 -0700 Subject: [Vtigercrm-developers] Patch for decoupling Accounts from Potential Message-ID: <27CABE0A5EFD714EA5B2F9B47EE5CB85EDD693@svawmc1.awnow.local> We have a simple way of accomplishing this. Would love to see this or something like it roled into the main branch after 5.0.3 is released. http://forums.vtiger.com/viewtopic.php?p=47584#47584 Regards, Brian Laughlin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/3b8f7b0a/attachment.htm From gopals at vtiger.com Thu May 31 05:41:42 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 31 May 2007 18:11:42 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <465EC286.9060507@vtiger.com> Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal From richie at vtiger.com Thu May 31 06:12:34 2007 From: richie at vtiger.com (richie) Date: Thu, 31 May 2007 18:42:34 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC286.9060507@vtiger.com> References: <465EC286.9060507@vtiger.com> Message-ID: <465EC9C2.8040301@vtiger.com> Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 Thank you all for your patience and faith, *Richie* Gopal wrote: > Dear Team, > > I am happy to inform you all that we have successfully completed all our > routine tests. We are expecting release in another few hours time. > > Thanks & Regards, > Gopal > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/74578fc5/attachment.html From brett.hooker at roarz.com Thu May 31 06:48:38 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 31 May 2007 23:48:38 +1000 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC9C2.8040301@vtiger.com> References: <465EC286.9060507@vtiger.com> <465EC9C2.8040301@vtiger.com> Message-ID: <465ED236.30205@roarz.com> Definition of popularity? Bringing SourceForge down when you release a product: richie wrote: > Dear Team, > > vtigercrm-5.0.3 is officially released. > You can have a look at the files at > http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 > > Thank you all for your patience and faith, > *Richie* > > Gopal wrote: >> Dear Team, >> >> I am happy to inform you all that we have successfully completed all our >> routine tests. We are expecting release in another few hours time. >> >> Thanks & Regards, >> Gopal >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: vt503dl-error.png Type: image/png Size: 52074 bytes Desc: not available Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/vt503dl-error-0001.png From rvpromociones at yahoo.es Thu May 31 16:00:58 2007 From: rvpromociones at yahoo.es (Yosu Cadilla) Date: Thu, 31 May 2007 23:00:58 +0000 (GMT) Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <20070531230058.75110.qmail@web28008.mail.ukl.yahoo.com> Indeed! Saludos, Yosu Cadilla. ____________________________________________________________________________________ ?Descubre una nueva forma de obtener respuestas a tus preguntas! Entra en Yahoo! Respuestas. http://es.answers.yahoo.com/info/welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/14773489/attachment.html From Andreas.Reiche at LGN.Niedersachsen.de Thu May 31 23:18:16 2007 From: Andreas.Reiche at LGN.Niedersachsen.de (Reiche, Andreas) Date: Fri, 1 Jun 2007 08:18:16 +0200 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: Hi Team, thanks for your great work! A few question regarding SVN: Will this release be tagged in SVN? Is it based on Changeset 11172? Where will the ongoing developement be taken (5.0.3 Branch or another one or new trunk)? I ask because i would prefer to check out from SVN for testing and developing environement. regards, Andreas Reiche, Von: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] Im Auftrag von richie Gesendet: Donnerstag, 31. Mai 2007 15:13 An: vtigercrm-developers at lists.vtigercrm.com Betreff: Re: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=2334 79 Thank you all for your patience and faith, Richie Gopal wrote: Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Tue May 1 13:58:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 19:58:50 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <20070501175850.GB26224@nibiru.local> * Jorge Torres schrieb: Hi, > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that > may differ a lot from what vtiger golas might be, therefore I want > to start a new project at sourceforge.net based on vtigerCRM 5. Of course you're free to do your own fork, but I'd like to invite you to contribute to the upstream. If you're moving too far from the upstream, we cannot benefit from each other's work anymore. BTW: I'm currently working on my own branch for really porting it to postgresql. There're lots of things to clean up here. Once this is is done (and hopefully went to the upstream), I'm going to some works on making it easier to use (ie. switch off unused features). Maybe you'd like to join me ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Tue May 1 15:48:36 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 1 May 2007 14:48:36 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501175850.GB26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> Message-ID: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Enrico, Sure count me in, Can you send me some of your todo list, so I can check what I'm capable of helping with? That minimized branch you mentioned, would it still support MySQL? At this moment, I'm working on changing the pop-up windows, for WebWM windows, anyhow I will prepare a todo list I have in mind, so you get to see where we can join forces. Thank you, Jorge On 5/1/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Of course you're free to do your own fork, but I'd like to invite > you to contribute to the upstream. If you're moving too far from the > upstream, we cannot benefit from each other's work anymore. > > BTW: I'm currently working on my own branch for really porting it to > postgresql. There're lots of things to clean up here. Once this is > is done (and hopefully went to the upstream), I'm going to some > works on making it easier to use (ie. switch off unused features). > > Maybe you'd like to join me ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070501/689d85dc/attachment-0001.html From weigelt at metux.de Tue May 1 16:05:52 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 22:05:52 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Message-ID: <20070501200552.GC26224@nibiru.local> * Jorge Torres schrieb: Hi, > Can you send me some of your todo list, so I can check what > I'm capable of helping with? The most important, for now, is to replace all the $adb->query_result() calls, since a) it does not work with postgresql (adodb brokenness) and b) it's an huge resource waster. > That minimized branch you mentioned, would it still support MySQL? Yep. I don't intend to drop it. > At this moment, I'm working on changing the pop-up windows, for WebWM > windows, anyhow I will prepare a todo list I have in mind, so you get to see > where we can join forces. Ok. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From dome at tel.co.th Tue May 1 21:06:13 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 08:06:13 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> What's status of your poetgresql branch ? Can i test ? Dome C. On 5/2/07, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From gopals at vtiger.com Wed May 2 00:19:25 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 02 May 2007 09:49:25 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <4638114D.5010303@vtiger.com> Hi Jorge, Thanks for your interest in vtiger CRM project. Please see my response below (in blue color) Jorge Torres wrote: > Hi everyone, > > First I want to tell you developers that I admire your work. I first > downloaded vtiger a few days ago, for customer relationship management > at my uncles little ceramic factory, and I was amazed, but after I > showed it to him, well, it seems that it is too much for what my uncle > wants. * Gopal:* From the Security settings module, you can disable modules/fields that are not required. Please get back to me if you need any further clarifications. > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that may > differ a lot from what vtiger golas might be, therefore I want to > start a new project at sourceforge.net based > on vtigerCRM 5. * Gopal:* Down the road, we are planning to make vtiger CRM - fully customizable so that business users configure the vtiger system instead of hacking the code. Could you please post your goals, so that we will cross-check our road map and let you know our position? > I don't understand to much about Open Source Licencing restrictions > and related stuff, so please excuse my ignorance. My question are: * Gopal:* vtiger CRM code base contains our _*own contributions*_ and many third-party packages. Our own contributions are released under _vtiger Public License (based on Mozilla Public License)_. Please refer to the following URL for details about licenses of third-party packages: http://wiki.vtiger.com/index.php/Third_Party_Software > > Can I start a new project at sourceforge based on vtiger? * Gopal:* In general there are no issues in forking open source projects, provided you are not violating the Open Source license of your predecessor. > If so, Would I have to cover it under some other new license type? *Gopal:* Release your contributions under some Open Source license which meets your requirements. > Do I need some permit from vtiger team to start such project? * Gopal:* _vtiger CRM code base_ is 100% open source by spirit. Hence you may not require special permission from our side. > I know about removing logos because of trademarks, what else do I have > to remove? * > * * Gopal:* Kindly review the vtiger and other third-party licenses with your Legal adviser (council) before modifying back-end/front-end code base. On a separate note, our community is actively participating in vtiger development. Most of the community members (developers/testers/writers/translators) are directly contributing to the core code base (For example: PostgreSQL & DMS branches in our SVN). http://vtiger.fosslabs.com We are also encouraging many add-on projects based on vtiger CRM, which cater to the need of user-specific requirements. For more details, please refer to our vtigerForge: http://vtigerforge.com Best wishes, Gopal (vtiger - Team Member) > > Well that's it for now, I will continue on my "trying to understand > vtiger's code" task, so I will probably have some questions related to > developing in short. > > Thank you very much, > > > Jorge > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/48cab81f/attachment-0001.html From jens at Strawberry.COM Wed May 2 02:20:57 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:20:57 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local>; from Enrico Weigelt on Tue, May 01, 2007 at 10:05:52PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <20070502082057.D16394@Strawberry.COM> Hi, I already did a port to postgresql and have contributed my patches to Don and Ritchie so far. I do not agree that the $adb->query_results are broken as I'm running on postgresql since 5.0rc1 ... Jens On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 2 02:21:30 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:21:30 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:06:13AM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502082130.E16394@Strawberry.COM> You may use the 5.1_jens branch which is working. Jens On Wed, May 02, 2007 at 08:06:13AM +0700, Dome Charoenyost wrote: > What's status of your poetgresql branch ? > > Can i test ? > > Dome C. > > > On 5/2/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 2 06:35:59 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 12:35:59 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638114D.5010303@vtiger.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> Message-ID: <1178102159.31989.24.camel@joesunix.int> Hi, I read this thread and I just keep asking myself: what am I doing wrong? You guys have branches and are participating. I have been asking to help for a long time now and I am just being ignored. I really would like to help and work together. Joe TSolucio El mi?, 02-05-2007 a las 09:49 +0530, Gopal escribi?: > Hi Jorge, > > Thanks for your interest in vtiger CRM project. > > Please see my response below (in blue color) > > Jorge Torres wrote: > > Hi everyone, > > > > First I want to tell you developers that I admire your work. I first > > downloaded vtiger a few days ago, for customer relationship > > management at my uncles little ceramic factory, and I was amazed, > > but after I showed it to him, well, it seems that it is too much for > > what my uncle wants. > > Gopal: From the Security settings module, you can disable > modules/fields that are not required. Please get back to me if you > need any further clarifications. > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Gopal: Down the road, we are planning to make vtiger CRM - fully > customizable so that business users configure the vtiger system > instead of hacking the code. Could you please post your goals, so > that we will cross-check our road map and let you know our position? > > I don't understand to much about Open Source Licencing restrictions > > and related stuff, so please excuse my ignorance. My question are: > > Gopal: vtiger CRM code base contains our own contributions and many > third-party packages. Our own contributions are released under vtiger > Public License (based on Mozilla Public License). Please refer to the > following URL for details about licenses of third-party packages: > > http://wiki.vtiger.com/index.php/Third_Party_Software > > > > Can I start a new project at sourceforge based on vtiger? > > Gopal: In general there are no issues in forking open source projects, > provided you are not violating the Open Source license of your > predecessor. > > If so, Would I have to cover it under some other new license type? > Gopal: Release your contributions under some Open Source license which > meets your requirements. > > Do I need some permit from vtiger team to start such project? > > Gopal: vtiger CRM code base is 100% open source by spirit. Hence you > may not require special permission from our side. > > I know about removing logos because of trademarks, what else do I > > have to remove? > > Gopal: Kindly review the vtiger and other third-party licenses with > your Legal adviser (council) before modifying back-end/front-end code > base. > > On a separate note, our community is actively participating in vtiger > development. Most of the community members > (developers/testers/writers/translators) are directly contributing to > the core code base (For example: PostgreSQL & DMS branches in our > SVN). > > http://vtiger.fosslabs.com > > We are also encouraging many add-on projects based on vtiger CRM, > which cater to the need of user-specific requirements. For more > details, please refer to our vtigerForge: > > http://vtigerforge.com > > Best wishes, > Gopal > (vtiger - Team Member) > > > > Well that's it for now, I will continue on my "trying to understand > > vtiger's code" task, so I will probably have some questions related > > to developing in short. > > > > Thank you very much, > > > > > > Jorge > > > > ____________________________________________________________________ > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Wed May 2 06:56:24 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 12:56:24 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502105624.GA5311@nibiru.local> * Dome Charoenyost schrieb: > What's status of your poetgresql branch ? Work is still in progress. > Can i test ? I'll try to get some patches ready today. Or should I upload to SVN (need some short howto, I'm not really expierenced w/ svn) ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 2 07:13:36 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 13:13:36 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <20070502111336.GB5311@nibiru.local> * Jens Hamisch schrieb: Hi, > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... well, I can only speak for the latest release and my trunk checkout of last week. a) several things in schema create needed to be fixed b) schema update (ie. ALTER TABLE ...) was totally broken c) the adodb Move() method was completely missing in the postgres driver And the $adb->query_results() thing: Well, it's and really bad idea (even if pgsql->Move() would work). Too much complexity in- and outside, too long codepathes, too inefficient. I've introduced some new query functions: * $adb->run_query_allrecords($query) -> returns the result in an array/list records (associative arrays) * $adb->run_query_record($query) -> returns only the first record. * $adb->run_query_field($query,$field) -> returns given field from the first record * $adb->run_query_list($query,$field) -> returns an list of the values from given field. Now I'm in the process of rewriting the calls to query_result() to an appropriate of the new functions. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 2 09:24:47 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 15:24:47 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502111336.GB5311@nibiru.local>; from Enrico Weigelt on Wed, May 02, 2007 at 01:13:36PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> Message-ID: <20070502152447.A6085@Strawberry.COM> Hi, please have a look at the 5.1_jens branch at first! This is a 5.0.3 release sucessfully running on postgresql. This version is stable. The database fixes were introduced in an early 5.0 prerelease. I'm running vtiger on postgres since then. Part of the patches were already implemented in 5.0GA. The rest was posted to Richie/Don about 3 weeks ago. JenS On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > I already did a port to postgresql and have contributed my patches to > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > broken as I'm running on postgresql since 5.0rc1 ... > > well, I can only speak for the latest release and my trunk checkout > of last week. > > a) several things in schema create needed to be fixed > b) schema update (ie. ALTER TABLE ...) was totally broken > c) the adodb Move() method was completely missing in the postgres driver > > And the $adb->query_results() thing: > Well, it's and really bad idea (even if pgsql->Move() would work). > Too much complexity in- and outside, too long codepathes, too inefficient. > > I've introduced some new query functions: > > * $adb->run_query_allrecords($query) > -> returns the result in an array/list records (associative arrays) > > * $adb->run_query_record($query) > -> returns only the first record. > > * $adb->run_query_field($query,$field) > -> returns given field from the first record > > * $adb->run_query_list($query,$field) > -> returns an list of the values from given field. > > Now I'm in the process of rewriting the calls to query_result() > to an appropriate of the new functions. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 09:45:38 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:45:38 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502152447.A6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> Message-ID: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> i still found error on 5.1_jens Fatal error: Call to a member function on a non-object in /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 postgresql 8.1 php4.4 Debian etch Dome C. On 5/2/07, Jens Hamisch wrote: > > Hi, > > please have a look at the 5.1_jens branch at first! This is > a 5.0.3 release sucessfully running on postgresql. > This version is stable. The database fixes were introduced in > an early 5.0 prerelease. I'm running vtiger on postgres since > then. > > Part of the patches were already implemented in 5.0GA. The rest > was posted to Richie/Don about 3 weeks ago. > > JenS > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > * Jens Hamisch schrieb: > > > > Hi, > > > > > I already did a port to postgresql and have contributed my patches to > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > well, I can only speak for the latest release and my trunk checkout > > of last week. > > > > a) several things in schema create needed to be fixed > > b) schema update (ie. ALTER TABLE ...) was totally broken > > c) the adodb Move() method was completely missing in the postgres driver > > > > And the $adb->query_results() thing: > > Well, it's and really bad idea (even if pgsql->Move() would work). > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > I've introduced some new query functions: > > > > * $adb->run_query_allrecords($query) > > -> returns the result in an array/list records (associative arrays) > > > > * $adb->run_query_record($query) > > -> returns only the first record. > > > > * $adb->run_query_field($query,$field) > > -> returns given field from the first record > > > > * $adb->run_query_list($query,$field) > > -> returns an list of the values from given field. > > > > Now I'm in the process of rewriting the calls to query_result() > > to an appropriate of the new functions. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From dome at tel.co.th Wed May 2 09:46:16 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:46:16 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502105624.GA5311@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> <20070502105624.GA5311@nibiru.local> Message-ID: <8ccbff060705020646h4c848925k30338b574e6c2d60@mail.gmail.com> Please send me patch Thanks. Dome C. On 5/2/07, Enrico Weigelt wrote: > * Dome Charoenyost schrieb: > > What's status of your poetgresql branch ? > > Work is still in progress. > > > Can i test ? > > I'll try to get some patches ready today. > > Or should I upload to SVN (need some short howto, I'm not > really expierenced w/ svn) ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 10:37:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 16:37:37 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:45:38PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> Message-ID: <20070502163737.B6085@Strawberry.COM> Hi, I'm running php 5.1.4. According to the installation manual, 5.0.x thru 5.2.x is supported only. Jens On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > i still found error on 5.1_jens > Fatal error: Call to a member function on a non-object in > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > postgresql 8.1 > php4.4 > > Debian etch > > Dome C. > > > > On 5/2/07, Jens Hamisch wrote: > > > > Hi, > > > > please have a look at the 5.1_jens branch at first! This is > > a 5.0.3 release sucessfully running on postgresql. > > This version is stable. The database fixes were introduced in > > an early 5.0 prerelease. I'm running vtiger on postgres since > > then. > > > > Part of the patches were already implemented in 5.0GA. The rest > > was posted to Richie/Don about 3 weeks ago. > > > > JenS > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > * Jens Hamisch schrieb: > > > > > > Hi, > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > well, I can only speak for the latest release and my trunk checkout > > > of last week. > > > > > > a) several things in schema create needed to be fixed > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > And the $adb->query_results() thing: > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > I've introduced some new query functions: > > > > > > * $adb->run_query_allrecords($query) > > > -> returns the result in an array/list records (associative arrays) > > > > > > * $adb->run_query_record($query) > > > -> returns only the first record. > > > > > > * $adb->run_query_field($query,$field) > > > -> returns given field from the first record > > > > > > * $adb->run_query_list($query,$field) > > > -> returns an list of the values from given field. > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > to an appropriate of the new functions. > > > > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 11:22:52 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 22:22:52 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502163737.B6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> Message-ID: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> I'm test on php 5.2 found object to string error ( in log->debug) when create new contact Call to a member function Move() on a non-object in /var/www/crmpgsql/include/database/PearDatabase.php on line 441 Dome C. On 5/2/07, Jens Hamisch wrote: > Hi, > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > 5.2.x is supported only. > > Jens > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > i still found error on 5.1_jens > > Fatal error: Call to a member function on a non-object in > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > postgresql 8.1 > > php4.4 > > > > Debian etch > > > > Dome C. > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > Hi, > > > > > > please have a look at the 5.1_jens branch at first! This is > > > a 5.0.3 release sucessfully running on postgresql. > > > This version is stable. The database fixes were introduced in > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > then. > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > was posted to Richie/Don about 3 weeks ago. > > > > > > JenS > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > * Jens Hamisch schrieb: > > > > > > > > Hi, > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > of last week. > > > > > > > > a) several things in schema create needed to be fixed > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > And the $adb->query_results() thing: > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > I've introduced some new query functions: > > > > > > > > * $adb->run_query_allrecords($query) > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > * $adb->run_query_record($query) > > > > -> returns only the first record. > > > > > > > > * $adb->run_query_field($query,$field) > > > > -> returns given field from the first record > > > > > > > > * $adb->run_query_list($query,$field) > > > > -> returns an list of the values from given field. > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > to an appropriate of the new functions. > > > > > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 12:00:05 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 18:00:05 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 10:22:52PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> Message-ID: <20070502180005.A6711@Strawberry.COM> Hi Richie, didn't Mr. Priebsch tell us something about name space modifications between php 5.1.x and 5.2.0? In fact the version running at my side (php 5.1.4) seems run into problems on 5.2.0 ... Jens On Wed, May 02, 2007 at 10:22:52PM +0700, Dome Charoenyost wrote: > I'm test on php 5.2 found object to string error ( in log->debug) > > when create new contact > Call to a member function Move() on a non-object in > /var/www/crmpgsql/include/database/PearDatabase.php on line 441 > > Dome C. > > On 5/2/07, Jens Hamisch wrote: > > Hi, > > > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > > 5.2.x is supported only. > > > > Jens > > > > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > > i still found error on 5.1_jens > > > Fatal error: Call to a member function on a non-object in > > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > > > postgresql 8.1 > > > php4.4 > > > > > > Debian etch > > > > > > Dome C. > > > > > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > > > Hi, > > > > > > > > please have a look at the 5.1_jens branch at first! This is > > > > a 5.0.3 release sucessfully running on postgresql. > > > > This version is stable. The database fixes were introduced in > > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > > then. > > > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > > was posted to Richie/Don about 3 weeks ago. > > > > > > > > JenS > > > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > > * Jens Hamisch schrieb: > > > > > > > > > > Hi, > > > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > > of last week. > > > > > > > > > > a) several things in schema create needed to be fixed > > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > > > And the $adb->query_results() thing: > > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > > > I've introduced some new query functions: > > > > > > > > > > * $adb->run_query_allrecords($query) > > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > > > * $adb->run_query_record($query) > > > > > -> returns only the first record. > > > > > > > > > > * $adb->run_query_field($query,$field) > > > > > -> returns given field from the first record > > > > > > > > > > * $adb->run_query_list($query,$field) > > > > > -> returns an list of the values from given field. > > > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > > to an appropriate of the new functions. > > > > > > > > > > > > > > > cu > > > > > -- > > > > > --------------------------------------------------------------------- > > > > > Enrico Weigelt == metux IT service > > > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > > fax: +49 36207 519932 email: contact at metux.de > > > > > cellphone: +49 174 7066481 > > > > > --------------------------------------------------------------------- > > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > > --------------------------------------------------------------------- > > > > > _______________________________________________ > > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > > -- > > > > > > > > -------------------------------------------------------------------------------- > > > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > > SSSSS-----SSSSS > > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > > SSSSSSSSS Jens Hamisch > > > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 2 12:31:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 18:31:09 +0200 Subject: [Vtigercrm-developers] insert data function Message-ID: <20070502163109.GA19391@nibiru.local> Hi folks, JFYI: I've added an new function run_insert_data($table,$data) to the PearDatabase lass ($adb). It handles the cases where simply one record is inserted to some table. The sql query is built from an associative array (in fact this is done by sql_insert_data()), executed and if an error is detected, an error is thrown. I'm going to submit an patch this afternoon. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 2 15:13:25 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:13:25 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Hi, Since it is now clear that postgres is supported, the only thing would be about Enrico's opinion of adb->query_results being resource wasting, which is very important regardless of mysql or postgres use, Enrico, what are you doing instead of using the query_results method? About the other thing here is a todo list which could possibly be common with vtiger's: - Use WebWM (webwm.sourceforge.net), instead of porpup windows which are blocked by internet explorer and sometimes firefox, also use WebWM for virtual windows, such as the ones in editing custom fields. - I don't know why imap email doest work, I get the message that email should be configured, even if it is in fact configured, well so i will try to fix that, + adding imap options to the Add user template, - DHTML Customizable pdf sheet creator for sales-orders and the others, - AJAX calendar refresh, and adding standard calendar view on a floating window. - Date field DHTML floating box. - Help DHTML widgets, which will soon be offered by the webwm framework. - Translation facility, probably a script that reads every lang file, and organizes it in a HTML form, and then form it regenerate the lang files, so language translation can be made from web, rather that getting into the code, + the fact of making it a lot more easier when adding new definitions and translating them to the other files. Well with that I think I have lot to play with for some time. Thank you, Jorge On 5/2/07, Jens Hamisch wrote: > > > Hi, > > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... > > Jens > > > On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get > to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/1c28fc7c/attachment-0002.html From joe at tsolucio.com Wed May 2 15:37:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 21:37:14 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <4638E86A.70707@tsolucio.com> Hi Jorge, Jorge Torres escribi?: > Hi, > > Since it is now clear that postgres is supported, the only thing would > be about Enrico's opinion of adb->query_results being resource > wasting, which is very important regardless of mysql or postgres use, > Enrico, what are you doing instead of using the query_results method? > > About the other thing here is a todo list which could possibly be > common with vtiger's: > > - Use WebWM (webwm.sourceforge.net ), > instead of porpup windows which are blocked by internet explorer and > sometimes firefox, also use WebWM for virtual windows, such as the > ones in editing custom fields. > Really nice. Hope you can get somewhere. > - I don't know why imap email doest work, I get the message that email > should be configured, even if it is in fact configured, well so i will > try to fix that, + adding imap options to the Add user template, > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > - AJAX calendar refresh, and adding standard calendar view on a > floating window. > > - Date field DHTML floating box. > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > - Translation facility, probably a script that reads every lang file, > and organizes it in a HTML form, and then form it regenerate the lang > files, so language translation can be made from web, rather that > getting into the code, + the fact of making it a lot more easier when > adding new definitions and translating them to the other files. > Try the Language Wizard in vtigerforge. This is what I use and I think it is a very good module, it does exactly what you are asking for. > Well with that I think I have lot to play with for some time. > > Thank you, > > Jorge > Joe TSolucio From jorge.torres.maldonado at gmail.com Wed May 2 15:59:12 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:59:12 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638E86A.70707@tsolucio.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <4638E86A.70707@tsolucio.com> Message-ID: <530c7d700705021259r4d70223cmd6981af85d4d1360@mail.gmail.com> Thanks Joe, language module seems awesome On 5/2/07, Joe Bordes wrote: > > Hi Jorge, > > Jorge Torres escribi?: > > Hi, > > > > Since it is now clear that postgres is supported, the only thing would > > be about Enrico's opinion of adb->query_results being resource > > wasting, which is very important regardless of mysql or postgres use, > > Enrico, what are you doing instead of using the query_results method? > > > > About the other thing here is a todo list which could possibly be > > common with vtiger's: > > > > - Use WebWM (webwm.sourceforge.net ), > > instead of porpup windows which are blocked by internet explorer and > > sometimes firefox, also use WebWM for virtual windows, such as the > > ones in editing custom fields. > > > Really nice. Hope you can get somewhere. > > > - I don't know why imap email doest work, I get the message that email > > should be configured, even if it is in fact configured, well so i will > > try to fix that, + adding imap options to the Add user template, > > > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > > > - AJAX calendar refresh, and adding standard calendar view on a > > floating window. > > > > - Date field DHTML floating box. > > > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > > > - Translation facility, probably a script that reads every lang file, > > and organizes it in a HTML form, and then form it regenerate the lang > > files, so language translation can be made from web, rather that > > getting into the code, + the fact of making it a lot more easier when > > adding new definitions and translating them to the other files. > > > Try the Language Wizard in vtigerforge. This is what I use and I think > it is a very good module, it does exactly what you are asking for. > > Well with that I think I have lot to play with for some time. > > > > Thank you, > > > > Jorge > > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/3ed19b0a/attachment.html From weigelt at metux.de Wed May 2 22:36:53 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 04:36:53 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <20070503023653.GA29236@nibiru.local> * Jorge Torres schrieb: Hi, > Since it is now clear that postgres is supported, the only thing would be > about Enrico's opinion of adb->query_results being resource wasting, which > is very important regardless of mysql or postgres use, Enrico, what are > you doing instead of using the query_results method? As already said: introduced some new functions, which fetch either one record (run_query_record() and run_query_field()) or all records (run_query_allrecords() and run_query_list()) and simply return the data. There are several result types: a) just one scalar: -> run_query_field($query,$fieldname) --> returns an scalar b) just one record: -> run_query_record($query) --> returns an associative array c) an list of scalars -> run_query_list($query,$fieldname) --> returns an array/list of scalars d) an list of records: -> run_query_allreords($query) --> returns an array/list of ass. arrays cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gopals at vtiger.com Thu May 3 00:26:58 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 03 May 2007 09:56:58 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <1178102159.31989.24.camel@joesunix.int> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> <1178102159.31989.24.camel@joesunix.int> Message-ID: <46396492.7010106@vtiger.com> Hi Joe, Sorry for the inconvenience. We don't have issues in providing separate branches for our developer community. Could you please send us your future development plans to philip at vtiger.com so that he will create branches based on your requirements. Regards, Gopal Joe Bordes wrote: > Hi, > > I read this thread and I just keep asking myself: > what am I doing wrong? > > You guys have branches and are participating. I have been asking to help > for a long time now and I am just being ignored. > > I really would like to help and work together. > > Joe > TSolucio > > El mi??, 02-05-2007 a las 09:49 +0530, Gopal escribi??: > >> Hi Jorge, >> >> Thanks for your interest in vtiger CRM project. >> >> Please see my response below (in blue color) >> >> Jorge Torres wrote: >> >>> Hi everyone, >>> >>> First I want to tell you developers that I admire your work. I first >>> downloaded vtiger a few days ago, for customer relationship >>> management at my uncles little ceramic factory, and I was amazed, >>> but after I showed it to him, well, it seems that it is too much for >>> what my uncle wants. >>> >> Gopal: From the Security settings module, you can disable >> modules/fields that are not required. Please get back to me if you >> need any further clarifications. >> >>> I love PHP, and I thought that I could minimize it to what at this >>> moment I need, and in near future add more AJAX to it. I know that >>> may differ a lot from what vtiger golas might be, therefore I want >>> to start a new project at sourceforge.net based on vtigerCRM 5. >>> >> Gopal: Down the road, we are planning to make vtiger CRM - fully >> customizable so that business users configure the vtiger system >> instead of hacking the code. Could you please post your goals, so >> that we will cross-check our road map and let you know our position? >> >>> I don't understand to much about Open Source Licencing restrictions >>> and related stuff, so please excuse my ignorance. My question are: >>> >> Gopal: vtiger CRM code base contains our own contributions and many >> third-party packages. Our own contributions are released under vtiger >> Public License (based on Mozilla Public License). Please refer to the >> following URL for details about licenses of third-party packages: >> >> http://wiki.vtiger.com/index.php/Third_Party_Software >> >>> Can I start a new project at sourceforge based on vtiger? >>> >> Gopal: In general there are no issues in forking open source projects, >> provided you are not violating the Open Source license of your >> predecessor. >> >>> If so, Would I have to cover it under some other new license type? >>> >> Gopal: Release your contributions under some Open Source license which >> meets your requirements. >> >>> Do I need some permit from vtiger team to start such project? >>> >> Gopal: vtiger CRM code base is 100% open source by spirit. Hence you >> may not require special permission from our side. >> >>> I know about removing logos because of trademarks, what else do I >>> have to remove? >>> >> Gopal: Kindly review the vtiger and other third-party licenses with >> your Legal adviser (council) before modifying back-end/front-end code >> base. >> >> On a separate note, our community is actively participating in vtiger >> development. Most of the community members >> (developers/testers/writers/translators) are directly contributing to >> the core code base (For example: PostgreSQL & DMS branches in our >> SVN). >> >> http://vtiger.fosslabs.com >> >> We are also encouraging many add-on projects based on vtiger CRM, >> which cater to the need of user-specific requirements. For more >> details, please refer to our vtigerForge: >> >> http://vtigerforge.com >> >> Best wishes, >> Gopal >> (vtiger - Team Member) >> >>> Well that's it for now, I will continue on my "trying to understand >>> vtiger's code" task, so I will probably have some questions related >>> to developing in short. >>> >>> Thank you very much, >>> >>> >>> Jorge >>> >>> ____________________________________________________________________ >>> >>> _______________________________________________ >>> Reach hundreds of potential candidates - http://jobs.vtiger.com >>> >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070503/f24f5451/attachment-0002.html From jens at Strawberry.COM Thu May 3 02:54:27 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 08:54:27 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503023653.GA29236@nibiru.local>; from Enrico Weigelt on Thu, May 03, 2007 at 04:36:53AM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> Message-ID: <20070503085427.A9675@Strawberry.COM> Hi Enrico, my fixes adress syntactical postgres support only. However yours also seems to improove performance. Is there any chance to have both fixes implemented (@don,richie)? Jens On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Since it is now clear that postgres is supported, the only thing would be > > about Enrico's opinion of adb->query_results being resource wasting, which > > is very important regardless of mysql or postgres use, Enrico, what are > > you doing instead of using the query_results method? > > As already said: introduced some new functions, which fetch either > one record (run_query_record() and run_query_field()) or all records > (run_query_allrecords() and run_query_list()) and simply return the data. > > There are several result types: > > a) just one scalar: -> run_query_field($query,$fieldname) > --> returns an scalar > b) just one record: -> run_query_record($query) > --> returns an associative array > c) an list of scalars -> run_query_list($query,$fieldname) > --> returns an array/list of scalars > d) an list of records: -> run_query_allreords($query) > --> returns an array/list of ass. arrays > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Thu May 3 08:28:02 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 19:28:02 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Jens, I try to test your branch with lxampp 1.5.3a (php 5.1.4) found same error Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 Please give me more information about php,postgresql version ? Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi Enrico, > > my fixes adress syntactical postgres support only. However > yours also seems to improove performance. Is there any chance > to have both fixes implemented (@don,richie)? > > Jens > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Since it is now clear that postgres is supported, the only thing would be > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > is very important regardless of mysql or postgres use, Enrico, what are > > > you doing instead of using the query_results method? > > > > As already said: introduced some new functions, which fetch either > > one record (run_query_record() and run_query_field()) or all records > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > There are several result types: > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > --> returns an scalar > > b) just one record: -> run_query_record($query) > > --> returns an associative array > > c) an list of scalars -> run_query_list($query,$fieldname) > > --> returns an array/list of scalars > > d) an list of records: -> run_query_allreords($query) > > --> returns an array/list of ass. arrays > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Thu May 3 09:40:04 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:40:04 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503154004.D6711@Strawberry.COM> Hi, my port is running on Solaris 10, postgres 8.1.2, PHP 5.1.4 Jens On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Thu May 3 09:56:34 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:56:34 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503155634.A11877@Strawberry.COM> Hi, I've verfied the 5.1_jens PearDatabase.php to my running version and found no differences. Could you please check the one attached to this mail to the one you're testing against? Kind regards, Jens Hamisch On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 -------------- next part -------------- info("PearDatabse ->".print_r($msg,true)); } else { $log1->info("PearDatabase ->".$msg); } return $msg; } function setDieOnError($value){ $this->dieOnError = $value; } function setDatabaseType($type){ $this->dbType = $type; } function setUserName($name){ $this->userName = $name; } function setOption($name, $value){ if(isset($this->dbOptions)) $this->dbOptions[$name] = $value; if(isset($this->database)) $this->database->setOption($name, $value); } function setUserPassword($pass){ $this->userPassword = $pass; } function setDatabaseName($db){ $this->dbName = $db; } function setDatabaseHost($host){ $this->dbHostName = $host; } function getDataSourceName(){ return $this->dbType. "://".$this->userName.":".$this->userPassword."@". $this->dbHostName . "/". $this->dbName; } function startTransaction() { $this->checkConnection(); $this->println("TRANS Started"); $this->database->StartTrans(); } function completeTransaction() { if($this->database->HasFailedTrans()) $this->println("TRANS Rolled Back"); else $this->println("TRANS Commited"); $this->database->CompleteTrans(); $this->println("TRANS Completed"); } /* ADODB converted * function checkError($msg='', $dieOnError=false) * { * if($this->dbType == "mysql") * { * if (mysql_errno()) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } * return false; * } * else * { * if(!isset($this->database)) * { * $this->log->error("Database Is Not Connected"); * return true; * } * if(DB::isError($this->database)) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal($msg.$this->database->getMessage()); * die ($msg.$this->database->getMessage()); * } else { * $this->log->error($msg.$this->database->getMessage()); * } * return true; * } * } * return false; * } */ function checkError($msg='', $dieOnError=false) { /* * if($this->database->ErrorNo()) * { * if($this->dieOnError || $dieOnError) * { * $this->println("ADODB error ".$this->database->ErrorNo()); * die ($msg."ADODB error ".$this->database->ErrorNo()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } */ if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); die ($msg."ADODB error ".$msg."->".$this->database->ErrorMsg()); } else { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); } return false; } function change_key_case($arr) { return is_array($arr)?array_change_key_case($arr):$arr; } var $req_flist; /** * @return void * @desc checks if a connection exists if it does not it closes the connection * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. * All Rights Reserved.. * Contributor(s): ______________________________________.. */ function checkConnection(){ global $log; if(!isset($this->database)) { $this->println("TRANS creating new connection"); /* * $flist=get_included_files(); * foreach($flist as $key=>$value) * { * if(!strstr($value,'\\modules') && !strstr($value,'\\data')) * unset($flist[$key]); * } * $this->println($flist); */ $this->connect(false); } else { //$this->println("checkconnect using old connection"); } } /* ADODB converted * function query($sql, $dieOnError=false, $msg='') * { * $this->println("query ".$sql); * $this->log->info('Query:' . $sql); * $this->checkConnection(); * $this->query_time = microtime(); * if($this->dbType == "mysql") * { * $result =& mysql_query($sql); * $this->lastmysqlrow = -1; * } else { * $result =& $this->database->query($sql); * } * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function query($sql, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB query ".$sql); $log->debug('query being executed : '.$sql); $this->checkConnection(); $result = & $this->database->Execute($sql); $this->lastmysqlrow = -1; if(!$result)$this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); return $result; } function getEmptyBlob() { //if(dbType=="oci8") return 'empty_blob()'; //else return 'null'; return 'null'; } function updateBlob($tablename, $colname, $id, $data) { $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id); $this->checkConnection(); $result = $this->database->UpdateBlob($tablename, $colname, $data, $id); $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id." status=".$result); return $result; } function updateBlobFile($tablename, $colname, $id, $filename) { $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename); $this->checkConnection(); $result = $this->database->UpdateBlobFile($tablename, $colname, $filename, $id); $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename." status=".$result); return $result; } /* ADODB converted * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') * { * if($this->dbType == "mysql") * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); * $this->lastsql = $sql; * * $this->checkConnection(); * $this->query_time = microtime(); * $result =& $this->database->limitQuery($sql,$start, $count); * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count); $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count); $this->checkConnection(); $result =& $this->database->SelectLimit($sql,$count,$start); if(!$result) $this->checkError($msg.' Limit Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getOne($sql, $dieOnError=false, $msg='') * { * $this->log->info('Get One:' . $sql); * $this->checkConnection(); * if($this->dbType == "mysql"){ * $queryresult =& $this->query($sql, $dieOnError, $msg); * $result =& mysql_result($queryresult,0); * } else { * $result =& $this->database->getOne($sql); * } * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); $this->checkConnection(); $result =& $this->database->GetOne($sql); if(!$result) $this->checkError($msg.' Get one Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getFieldsArray(&$result) * { * $field_array = array(); * * if(! isset($result) || empty($result)) * { * return 0; * } * * if($this->dbType == "mysql") * { * $i = 0; * while ($i < mysql_num_fields($result)) * { * $meta = mysql_fetch_field($result, $i); * * if (!$meta) * { * return 0; * } * * array_push($field_array,$meta->name); * * $i++; * } * } * else * { * $arr = tableInfo($result); * foreach ($arr as $index=>$subarr) * { * array_push($field_array,$subarr['name']); * } * } * * return $field_array; * } */ function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); $field_array = array(); if(! isset($result) || empty($result)) { return 0; } $i = 0; $n = $result->FieldCount(); while ($i < $n) { $meta = $result->FetchField($i); if (!$meta) { return 0; } array_push($field_array,$meta->name); $i++; } //$this->println($field_array); return $field_array; } /* ADODB Converted * function getRowCount(&$result) * { * if(isset($result) && !empty($result)) * if($this->dbType == "mysql"){ * return mysql_numrows($result); * } else { * return $result->numRows(); * } * return 0; * } */ function getRowCount(&$result){ global $log; //$this->println("ADODB getRowCount"); if(isset($result) && !empty($result)) $rows= $result->RecordCount(); //$this->println("ADODB getRowCount rows=".$rows); //$log->debug('getRowCount rows= '.$rows); return $rows; } /* ADODB newly added. replacement for mysql_num_rows */ function num_rows(&$result) { return $this->getRowCount($result); } /* ADODB newly added. replacement form mysql_num_fields */ function num_fields(&$result) { return $result->FieldCount(); } /* ADODB newly added. replacement for mysql_fetch_array() */ function fetch_array(&$result) { if($result->EOF) { //$this->println("ADODB fetch_array return null"); return NULL; } return $this->change_key_case($result->FetchRow()); } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); //Commented strip_selected_tags and added to_html function for HTML tags vulnerability //$coldata = strip_selected_tags($rowdata[$col],'script'); $coldata = to_html($rowdata[$col]); //$this->println("ADODB query_result ". $coldata); return $coldata; } /* ADODB Converted * function getAffectedRowCount(&$result) * { * if($this->dbType == "mysql"){ * return mysql_affected_rows(); * } * else { * return $result->affectedRows(); * } * return 0; * } */ function getAffectedRowCount(&$result) { global $log; //$this->println("ADODB getAffectedRowCount"); $log->debug('getAffectedRowCount'); $rows =$this->database->Affected_Rows(); //$this->println("ADODB getAffectedRowCount rows=".rows); $log->debug('getAffectedRowCount rows = '.$rows); return $rows; } /* ADODB converted * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ * $result = $this->query($sql, $dieOnError, $msg); * * if($this->getRowCount($result ) == 1) * return to_html($result, $encode); * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); * return ''; * } */ function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); if($this->getRowCount($result ) == 1) return $result; $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } /* ADODB converted * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) * { * if(isset($result) && $rowNum < 0) * { * if($this->dbType == "mysql"){ * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); * } * if($this->dbType == "mysql"){ * if($this->getRowCount($result) > $rowNum){ * mysql_data_seek($result, $rowNum); * } * $this->lastmysqlrow = $rowNum; * * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); * if($encode) * return array_map('to_html', $row); * return $row; * } */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { //$this->println("ADODB fetchByAssoc ".$rowNum." fetch mode=".$adb->database->$ADODB_FETCH_MODE); if($result->EOF) { $this->println("ADODB fetchByAssoc return null"); return NULL; } if(isset($result) && $rowNum < 0) { $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); //$this->println("ADODB fetchByAssoc r< 0 isarray r=".is_array($row)." r1=".is_array($row[1])); //$this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); //$this->println("ADODB fetchByAssoc r< 0 not array r1=".$row[1]); return $row; } //$this->println("ADODB fetchByAssoc after if ".$rowNum); if($this->getRowCount($result) > $rowNum) { $result->Move($rowNum); } $this->lastmysqlrow = $rowNum; //srini - think about this $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); $this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); return $row; } /* ADODB converted * function getNextRow(&$result, $encode=true) * { * if(isset($result)){ * $row = $result->fetchRow(); * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * return null; * } */ function getNextRow(&$result, $encode=true){ global $log; //$this->println("ADODB getNextRow"); $log->info('getNextRow'); if(isset($result)){ $row = $this->change_key_case($result->FetchRow()); if($row && $encode&& is_array($row)) return array_map('to_html', $row); return $row; } return null; } function fetch_row(&$result, $encode=true) { return $this->getNextRow($result); } function field_name(&$result, $col) { return $result->FetchField($col); } function getQueryTime(){ return $this->query_time; } /* * function execute($stmt, $data, $dieOnError=false, $msg=''){ * $this->log->info('Executing:'.$stmt); * $this->checkConnection(); * $this->query_time = microtime(); * $prepared = $this->database->prepare($stmt); * $result = execute($stmt, $data); * $this->query_time = microtime() - $this->query_time; * //$this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); * return $result; * } */ /* adodb converted * function connect($dieOnError = false){ * $this->println("connect"); * global $dbconfigoption; * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); * @mysql_select_db($this->dbName) or die( "Unable to select database"); * if(!$this->database){ * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); * if($this->connection == false && $dbconfigoption['persistent'] == true){ * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; * } * } * } * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); * if($this->checkError('Could Not Connect:', $dieOnError)) * $this->log->info("connected to db"); * * } */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); /* * $driver='mysql'; * $server='srinivasan'; * $user='root'; * $password=''; * $database='vtigercrm3_2'; * * $this->database = ADONewConnection($driver); * * #$this->database->debug = true; * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); */ /* * $this->dbHostName="srinivasan:1521"; * $this->userName="vt4"; * $this->userPassword="vt4"; * $this->dbName="srini"; * $this->dbType="oci8"; */ if(!isset($this->dbType)) { $this->println("ADODB Connect : DBType not specified"); return; } $this->database = ADONewConnection($this->dbType); //$this->database->debug = true; $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName); $this->database->LogSQL($this->enableSQLlog); //$this->database->SetFetchMode(ADODB_FETCH_ASSOC); //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } /* * function PearDatabase(){ * //$this->println("PearDatabase"); * global $currentModule; * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); * $this->resetSettings(); * } * * function resetSettings(){ * global $dbconfig, $dbconfigoption; * $this->disconnect(); * $this->setDatabaseType($dbconfig['db_type']); * $this->setUserName($dbconfig['db_username']); * $this->setUserPassword($dbconfig['db_password']); * $this->setDatabaseHost( $dbconfig['db_hostname']); * $this->setDatabaseName($dbconfig['db_name']); * $this->dbOptions = $dbconfigoption; * $this->enableSQLlog = ($dbconfig['log_sql'] == true); * //$this->println("resetSettings log=".$this->enableSQLlog); * //$this->println($dbconfig); * //if($this->dbType != "mysql"){ * // require_once( 'DB.php' ); * //} * } */ function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); global $currentModule; $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); $this->resetSettings($dbtype,$host,$dbname,$username,$passwd); } function resetSettings($dbtype,$host,$dbname,$username,$passwd) { global $dbconfig, $dbconfigoption; if($host == '') { $this->disconnect(); $this->setDatabaseType($dbconfig['db_type']); $this->setUserName($dbconfig['db_username']); $this->setUserPassword($dbconfig['db_password']); $this->setDatabaseHost( $dbconfig['db_hostname']); $this->setDatabaseName($dbconfig['db_name']); $this->dbOptions = $dbconfigoption; if($dbconfig['log_sql']) $this->enableSQLlog = ($dbconfig['log_sql'] == true); //$this->println("resetSettings log=".$this->enableSQLlog); //$this->println($dbconfig); /*if($this->dbType != "mysql"){ require_once( 'DB.php' ); }*/ } else { $this->disconnect(); $this->setDatabaseType($dbtype); $this->setDatabaseName($dbname); $this->setUserName($username); $this->setUserPassword($passwd); $this->setDatabaseHost( $host); } } function quote($string){ return $this->database->qstr($string); } /* ADODB converted * function disconnect() { * $this->println("disconnect"); * if(isset($this->database)){ * if($this->dbType == "mysql"){ * mysql_close($this->database); * } else { * $this->database->disconnect(); * } * unset($this->database); * } * } */ function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ if($this->dbType == "mysql"){ mysql_close($this->database); } else { $this->database->disconnect(); } unset($this->database); } } function setDebug($value) { $this->database->debug = $value; } // ADODB newly added methods function createTables($schemaFile, $dbHostName=false, $userName=false, $userPassword=false, $dbName=false, $dbType=false) { $this->println("ADODB createTables ".$schemaFile); if($dbHostName!=false) $this->dbHostName=$dbHostName; if($userName!=false) $this->userName=$userPassword; if($userPassword!=false) $this->userPassword=$userPassword; if($dbName!=false) $this->dbName=$dbName; if($dbType!=false) $this->dbType=$dbType; //$db = ADONewConnection($this->dbType); $this->checkConnection(); $db = $this->database; //$db->debug = true; //$this->println("ADODB createTables connect status=".$db->Connect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName)); $schema = new adoSchema( $db ); //Debug Adodb XML Schema $sehema->XMLS_DEBUG = TRUE; //Debug Adodb $sehema->debug = true; $sql = $schema->ParseSchema( $schemaFile ); $this->println("--------------Starting the table creation------------------"); //$this->println($sql); //integer ExecuteSchema ([array $sqlArray = NULL], [boolean $continueOnErr = NULL]) $result = $schema->ExecuteSchema( $sql, true ); if($result) print $db->errorMsg(); // needs to return in a decent way $this->println("ADODB createTables ".$schemaFile." status=".$result); return $result; } function createTable($tablename, $flds) { $this->println("ADODB createTable table=".$tablename." flds=".$flds); $this->checkConnection(); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $dict = NewDataDictionary($this->database); $sqlarray = $dict->CreateTableSQL($tablename, $flds); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB createTable table=".$tablename." flds=".$flds." status=".$result); return $result; } function alterTable($tablename, $flds, $oper) { $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $this->checkConnection(); $dict = NewDataDictionary($this->database); //$sqlarray = new Array(); if($oper == 'Add_Column') { $sqlarray = $dict->AddColumnSQL($tablename, $flds); } else if($oper == 'Delete_Column') { $sqlarray = $dict->DropColumnSQL($tablename, $flds); } $this->println("sqlarray"); $this->println($sqlarray); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper." status=".$result); return $result; } function getColumnNames($tablename) { $this->println("ADODB getColumnNames table=".$tablename); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); //$colNames = new Array(); $i=0; foreach($adoflds as $fld) { $colNames[$i] = $fld->name; $i++; } return $colNames; } function formatString($tablename,$fldname, $str) { //$this->println("ADODB formatString table=".$tablename." fldname=".$fldname." str=".$str); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); foreach ( $adoflds as $fld ) { //$this->println("ADODB formatString adofld =".$fld->name); if(strcasecmp($fld->name,$fldname)==0) { //$this->println("ADODB formatString fldname=".$fldname." fldtype =".$fld->type); $fldtype =strtoupper($fld->type); if(strcmp($fldtype,'CHAR')==0 || strcmp($fldtype,'VARCHAR') == 0 || strcmp($fldtype,'VARCHAR2') == 0 || strcmp($fldtype,'LONGTEXT')==0 || strcmp($fldtype,'TEXT')==0) { //$this->println("ADODB return else normal"); return $this->database->Quote($str); } else if(strcmp($fldtype,'DATE') ==0 || strcmp($fldtype,'TIMESTAMP')==0) { return $this->formatDate($str); } else { return $str; } } } $this->println("format String Illegal field name ".$fldname); return $str; } function formatDate($datetime) { $this->checkConnection(); //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); //if($db->dbType=='mysql') return $this->quote($date); return $date; } function getDBDateString($datecolname) { $this->checkConnection(); $db = &$this->database; $datestr = $db->SQLDate("Y-m-d, H:i:s" ,$datecolname); return $datestr; } function getUniqueID($seqname) { global $log; $this->checkConnection(); if( $this->dbType == "pgsql") { $keytab = $this->database->MetaPrimaryKeys($seqname); if( count( $keytab) > 0) { $log->info("PearDatabase: Postgres getUniqueID hack: ".$seqname."_".$keytab[0]."_seq"); return $this->database->GenID($seqname."_".$keytab[0]."_seq",1); } else { $log->info("PearDatabase: Problem: getUniqueID but no key for '$seqname'"); } } return $this->database->GenID($seqname."_seq",1); } function get_tables() { $this->checkConnection(); $result = & $this->database->MetaTables('TABLES'); $this->println($result); return $result; } } /* End of class */ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); ?> From dome at tel.co.th Thu May 3 10:40:59 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 21:40:59 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503155634.A11877@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> <20070503155634.A11877@Strawberry.COM> Message-ID: <8ccbff060705030740u1f6df32cjd133c656035acfe8@mail.gmail.com> Same problem. when create contact Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 When create new note Warning: mktime() expects parameter 6 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1388 Warning: mktime() expects parameter 1 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1389 Setting->orgunit Fatal error: Call to undefined method OrgUnit::getListQuery() in /opt/lampp/htdocs/vtiger/include/utils/ListViewUtils.php on line 2388 Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi, > > I've verfied the 5.1_jens PearDatabase.php to my running version > and found no differences. Could you please check the one attached to > this mail to the one you're testing against? > > Kind regards, > Jens Hamisch > > On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > > Jens, > > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > > found same error > > Fatal error: Call to a member function Move() on a non-object in > > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > > > Please give me more information about php,postgresql version ? > > > > Dome C. > > > > On 5/3/07, Jens Hamisch wrote: > > > > > > Hi Enrico, > > > > > > my fixes adress syntactical postgres support only. However > > > yours also seems to improove performance. Is there any chance > > > to have both fixes implemented (@don,richie)? > > > > > > Jens > > > > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > > > > > > Hi, > > > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > > you doing instead of using the query_results method? > > > > > > > > As already said: introduced some new functions, which fetch either > > > > one record (run_query_record() and run_query_field()) or all records > > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > > > There are several result types: > > > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > > --> returns an scalar > > > > b) just one record: -> run_query_record($query) > > > > --> returns an associative array > > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > > --> returns an array/list of scalars > > > > d) an list of records: -> run_query_allreords($query) > > > > --> returns an array/list of ass. arrays > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > From weigelt at metux.de Thu May 3 12:24:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:24:44 +0200 Subject: [Vtigercrm-developers] [PATCH] new functions and some cleanups Message-ID: <20070503162443.GA22625@nibiru.local> Hi folks, here are some patches (against latest trunk), which introduce the new functions and so some cleanups. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- ## ## takes db_port directly from the request variable, since register_globals ## is disabled most times and deprecated. ## diff -ruN upstream-10823/install/4createConfigFile.php working/install/4createConfigFile.php --- upstream-10823/install/4createConfigFile.php 2007-05-03 17:42:54.000000000 +0200 +++ working/install/4createConfigFile.php 2007-05-03 17:53:31.000000000 +0200 @@ -58,11 +58,14 @@ else { $db_hostname = $_REQUEST['db_hostname']; - if($db_type == "pgsql") - $db_port = '5432'; - else - $db_port = '3306'; - } + switch($_REQUEST{'db_type'}) + { + case 'pgsql': $db_port = '5432'; break; + case 'mysql': $db_port = '3306'; break; + default: + throw new Exception("unsupported db_type: \""+$_REQUEST{'db_type'}."\""); + } + } } if (isset($_REQUEST['db_username']))$db_username = $_REQUEST['db_username']; ## ## fixes error w/ duplicated class definitions. not sure if this is really correct ;-O ## diff -ruN upstream-10823/modules/Calendar/Date.php working/modules/Calendar/Date.php --- upstream-10823/modules/Calendar/Date.php 2007-05-03 17:43:39.000000000 +0200 +++ working/modules/Calendar/Date.php 2007-05-03 17:53:31.000000000 +0200 @@ -9,7 +9,7 @@ * ********************************************************************************/ -class DateTime +class X_DateTime { var $second = '00'; var $minute = '00'; -------------- next part -------------- ## ## adds new functions to the PearDatabase class to come around the whole ## broken query_result() idea ;-O ## diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 17:50:00.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:10:05.000000000 +0200 @@ -433,6 +433,144 @@ } return $this->change_key_case($result->FetchRow()); } + function run_query_record_html($query) + { + if (!is_array($rec = $this->run_query_record($query))) +// throw new Exception("no rec: $query"); + return $rec; + + foreach ($rec as $walk => $cur) + $r[$walk] = to_html($cur); + + return $r; + } + + function sql_quote($data) + { + if (is_array($data)) + { + switch($data{'type'}) + { + case 'text': + case 'numeric': + case 'integer': + case 'oid': + return $this->quote($data{'value'}); + break; + case 'timestamp': + return $this->formatDate($data{'value'}); + break; + default: + throw new Exception("unhandled type: ".serialize($cur)); + } + } + else + return $this->quote($data); + } + + function sql_insert_data($table, $data) + { + if (!$table) + throw new Exception("missing table name"); + if (!is_array($data)) + throw new Exception("data must be an array"); + if (!count($table)) + throw new Exception("no data given"); + + $sql_fields = ''; + $sql_data = ''; + foreach($data as $walk => $cur) + { + $sql_fields .= ($sql_fields?',':'').$walk; + $sql_data .= ($sql_data?',':'').$this->sql_quote($cur); + } + + return 'INSERT INTO '.$table.' ('.$sql_fields.') VALUES ('.$sql_data.')'; + } + + function run_insert_data($table,$data) + { + $query = $this->sql_insert_data($table,$data); + $res = $this->query($query); + $this->query("commit;"); + } + + function run_query_record($query) + { + $result = $this->query($query); + if (!$result) + return; +// throw new Exception("empty result !"); + + if (!is_object($result)) + throw new Exception("query \"$query\" failed: ".serialize($result)); + $res = $result->FetchRow(); + $rowdata = $this->change_key_case($res); + return $rowdata; + } + + function run_query_allrecords($query) + { + $result = $this->query($query); + $records = array(); + $sz = $this->num_rows($result); + for ($i=0; $i<$sz; $i++) + $records[$i] = $this->change_key_case($result->FetchRow()); + return $records; + } + + function run_query_field($query,$field) + { + $rowdata = $this->run_query_record($query); + return $rowdata{$field}; + } + + function run_query_list($query,$field) + { + $records = $this->run_query_allrecords($query); + foreach($records as $walk => $cur) + $list[] = $cur{$field}; + } + + function run_query_field_html($query,$field) + { + return to_html($this->run_query_field($query,$field)); + } + + function result_get_next_record($result) + { + return $this->change_key_case($result->FetchRow()); + } + + // create an IN expression from an array/list + function sql_expr_datalist($a) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur); + + return ' ( '.$l.' ) '; + } + + // create an IN expression from an record list, take $field within each record + function sql_expr_datalist_from_records($a,$field) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!$field) + throw new Exception("missing field"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur{$field}); + + return ' ( '.$l.' ) '; + } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) -------------- next part -------------- diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 18:13:24.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:17:22.000000000 +0200 @@ -104,46 +104,6 @@ $this->println("TRANS Completed"); } -/* ADODB converted - * function checkError($msg='', $dieOnError=false) - * { - * if($this->dbType == "mysql") - * { - * if (mysql_errno()) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); - * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); - * } else { - * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); - * } - * return true; - * } - * return false; - * } - * else - * { - * if(!isset($this->database)) - * { - * $this->log->error("Database Is Not Connected"); - * return true; - * } - * if(DB::isError($this->database)) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal($msg.$this->database->getMessage()); - * die ($msg.$this->database->getMessage()); - * } else { - * $this->log->error($msg.$this->database->getMessage()); - * } - * return true; - * } - * } - * return false; - * } - */ function checkError($msg='', $dieOnError=false) { @@ -160,7 +120,7 @@ * return true; * } */ - + if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); @@ -268,24 +228,6 @@ return $result; } -/* ADODB converted - * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') - * { - * if($this->dbType == "mysql") - * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); - * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); - * $this->lastsql = $sql; - * - * $this->checkConnection(); - * $this->query_time = microtime(); - * $result =& $this->database->limitQuery($sql,$start, $count); - * $this->query_time = microtime() - $this->query_time; - * $this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; @@ -297,22 +239,6 @@ return $result; } -/* ADODB converted - * function getOne($sql, $dieOnError=false, $msg='') - * { - * $this->log->info('Get One:' . $sql); - * $this->checkConnection(); - * if($this->dbType == "mysql"){ - * $queryresult =& $this->query($sql, $dieOnError, $msg); - * $result =& mysql_result($queryresult,0); - * } else { - * $result =& $this->database->getOne($sql); - * } - * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); @@ -322,46 +248,6 @@ return $result; } -/* ADODB converted - * function getFieldsArray(&$result) - * { - * $field_array = array(); - * - * if(! isset($result) || empty($result)) - * { - * return 0; - * } - * - * if($this->dbType == "mysql") - * { - * $i = 0; - * while ($i < mysql_num_fields($result)) - * { - * $meta = mysql_fetch_field($result, $i); - * - * if (!$meta) - * { - * return 0; - * } - * - * array_push($field_array,$meta->name); - * - * $i++; - * } - * } - * else - * { - * $arr = tableInfo($result); - * foreach ($arr as $index=>$subarr) - * { - * array_push($field_array,$subarr['name']); - * } - * } - * - * return $field_array; - * } - */ - function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); @@ -586,19 +472,6 @@ return $coldata; } -/* ADODB Converted - * function getAffectedRowCount(&$result) - * { - * if($this->dbType == "mysql"){ - * return mysql_affected_rows(); - * } - * else { - * return $result->affectedRows(); - * } - * return 0; - * } - */ - function getAffectedRowCount(&$result) { global $log; @@ -610,17 +483,6 @@ return $rows; } -/* ADODB converted - * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ - * $result = $this->query($sql, $dieOnError, $msg); - * - * if($this->getRowCount($result ) == 1) - * return to_html($result, $encode); - * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); - * return ''; - * } - */ - function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); @@ -630,40 +492,6 @@ $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } - - -/* ADODB converted - * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) - * { - * if(isset($result) && $rowNum < 0) - * { - * if($this->dbType == "mysql"){ - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); - * } - * if($this->dbType == "mysql"){ - * if($this->getRowCount($result) > $rowNum){ - * mysql_data_seek($result, $rowNum); - * } - * $this->lastmysqlrow = $rowNum; - * - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); - * if($encode) - * return array_map('to_html', $row); - * return $row; - * } - */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { @@ -703,20 +531,7 @@ return array_map('to_html', $row); return $row; } - -/* ADODB converted - * function getNextRow(&$result, $encode=true) - * { - * if(isset($result)){ - * $row = $result->fetchRow(); - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * return null; - * } - */ - + function getNextRow(&$result, $encode=true){ global $log; @@ -744,69 +559,12 @@ function getQueryTime(){ return $this->query_time; } - -/* - * function execute($stmt, $data, $dieOnError=false, $msg=''){ - * $this->log->info('Executing:'.$stmt); - * $this->checkConnection(); - * $this->query_time = microtime(); - * $prepared = $this->database->prepare($stmt); - * $result = execute($stmt, $data); - * $this->query_time = microtime() - $this->query_time; - * //$this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); - * return $result; - * } - */ - - -/* adodb converted - * function connect($dieOnError = false){ - * $this->println("connect"); - * global $dbconfigoption; - * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ - * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); - * @mysql_select_db($this->dbName) or die( "Unable to select database"); - * if(!$this->database){ - * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); - * if($this->connection == false && $dbconfigoption['persistent'] == true){ - * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; - * } - * } - * } - * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); - * if($this->checkError('Could Not Connect:', $dieOnError)) - * $this->log->info("connected to db"); - * - * } - */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); - -/* - * $driver='mysql'; - * $server='srinivasan'; - * $user='root'; - * $password=''; - * $database='vtigercrm3_2'; - * - * $this->database = ADONewConnection($driver); - * - * #$this->database->debug = true; - * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); - */ - -/* - * $this->dbHostName="srinivasan:1521"; - * $this->userName="vt4"; - * $this->userPassword="vt4"; - * $this->dbName="srini"; - * $this->dbType="oci8"; - */ if(!isset($this->dbType)) { @@ -823,32 +581,6 @@ //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } -/* - * function PearDatabase(){ - * //$this->println("PearDatabase"); - * global $currentModule; - * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); - * $this->resetSettings(); - * } - * - * function resetSettings(){ - * global $dbconfig, $dbconfigoption; - * $this->disconnect(); - * $this->setDatabaseType($dbconfig['db_type']); - * $this->setUserName($dbconfig['db_username']); - * $this->setUserPassword($dbconfig['db_password']); - * $this->setDatabaseHost( $dbconfig['db_hostname']); - * $this->setDatabaseName($dbconfig['db_name']); - * $this->dbOptions = $dbconfigoption; - * $this->enableSQLlog = ($dbconfig['log_sql'] == true); - * //$this->println("resetSettings log=".$this->enableSQLlog); - * //$this->println($dbconfig); - * //if($this->dbType != "mysql"){ - * // require_once( 'DB.php' ); - * //} - * } - */ - function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); @@ -893,21 +625,6 @@ return $this->database->qstr($string); } - -/* ADODB converted - * function disconnect() { - * $this->println("disconnect"); - * if(isset($this->database)){ - * if($this->dbType == "mysql"){ - * mysql_close($this->database); - * } else { - * $this->database->disconnect(); - * } - * unset($this->database); - * } - * } - */ - function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ @@ -1054,7 +771,6 @@ //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); - //if($db->dbType=='mysql') return $this->quote($date); return $date; } @@ -1083,6 +799,3 @@ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); - - -?> From weigelt at metux.de Thu May 3 12:33:22 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:33:22 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <20070503163322.GB22625@nibiru.local> * Jens Hamisch schrieb: Hi Enrico, > my fixes adress syntactical postgres support only. I'll have a look at it. Could you please give me some quick cmdline to fetch it (I'm not really experienced w/ svn) or an patch against latest release or trunk ? > However yours also seems to improove performance. Is there any > chance to have both fixes implemented (@don,richie) ? Well, let's try it step by step :) I've posted a first set of patches some mins ago. They should not break anything, just add the new functions and clean up old comments, etc. Would be great if you could check them if they fit your branch. IMHO they should be good enough to get into upstream quickly. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Thu May 3 12:48:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:48:09 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... Message-ID: <20070503164809.GA13215@nibiru.local> Hi folks, I've got lots of cases where PHP spits out an error message like: "Catchable fatal error: Object of class Accounts could not be converted to string in ....." This is triggered by the $log->debug() calls at the head of many functions, where an log message is cat'ed from the parameters. Obviously PHP does not know what to do with objects if they should be accessed as strings. No idea if there's an option for controlling that or whether it depends on the PHP version. For now I simply comment out these lines at my site, but that's proably not the solution. How can we cope with these cases ? Write an generic ObjToString() function which handles that (checks if its an object and then prints proper info, etc) or add an toString() method to all classes ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Thu May 3 14:03:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Thu, 03 May 2007 20:03:14 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... In-Reply-To: <20070503164809.GA13215@nibiru.local> References: <20070503164809.GA13215@nibiru.local> Message-ID: <463A23E2.9000603@tsolucio.com> Hi, All entities (except Users) inherit from crmentity, so what I do is add the toString function in data/crmentity.php to avoid the error. Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > I've got lots of cases where PHP spits out an error message like: > > "Catchable fatal error: Object of class Accounts could not > be converted to string in ....." > > This is triggered by the $log->debug() calls at the head of many > functions, where an log message is cat'ed from the parameters. > Obviously PHP does not know what to do with objects if they > should be accessed as strings. No idea if there's an option for > controlling that or whether it depends on the PHP version. > > For now I simply comment out these lines at my site, but that's > proably not the solution. > > How can we cope with these cases ? > > Write an generic ObjToString() function which handles that > (checks if its an object and then prints proper info, etc) > or add an toString() method to all classes ? > > > cu > From weigelt at metux.de Fri May 4 10:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 4 May 2007 16:47:48 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! Message-ID: <20070504144747.GB14102@nibiru.local> Hi folks, I'm currently trying out the 5.1_jens branch. It seems really broken :(( a) I had to add __toString() methods to certain objects b) The getOrgUnits() function is missing. I couldn't find anything about it on the web. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Sat May 5 14:28:16 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Sat, 5 May 2007 20:28:16 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070504144747.GB14102@nibiru.local>; from Enrico Weigelt on Fri, May 04, 2007 at 04:47:48PM +0200 References: <20070504144747.GB14102@nibiru.local> Message-ID: <20070505202816.A19389@Strawberry.COM> Hi, I'm going to have a look at this. The branch is just a copy of the definitely productive version I'm running here. Is there any limit on your (personal) mailbox? I may send an TAR archive to you ... Jens On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I'm currently trying out the 5.1_jens branch. > It seems really broken :(( > > a) I had to add __toString() methods to certain objects > > b) The getOrgUnits() function is missing. I couldn't find anything > about it on the web. > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Sat May 5 17:11:07 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Sun, 6 May 2007 04:11:07 +0700 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <8ccbff060705051411s2f06c50aufa1549505a3f018e@mail.gmail.com> send me please dome at tel.co.th Thanks Dome C. On 5/6/07, Jens Hamisch wrote: > > Hi, > > > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... > > > Jens > > > On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > > > Hi folks, > > > > > > I'm currently trying out the 5.1_jens branch. > > It seems really broken :(( > > > > a) I had to add __toString() methods to certain objects > > > > b) The getOrgUnits() function is missing. I couldn't find anything > > about it on the web. > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From weigelt at metux.de Sun May 6 11:54:04 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Sun, 6 May 2007 17:54:04 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <20070506155404.GA18277@nibiru.local> * Jens Hamisch schrieb: Hi, > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... Okay, go ahead :) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 08:57:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 14:57:28 +0200 Subject: [Vtigercrm-developers] 1/2 OT: diff + skip files Message-ID: <20070507125728.GA999@nibiru.local> Hi folks, could anyone give me an tip how to skip certain files on diff ? I'm currently merging jens' personal copy with the 5.1_jens branch from SVN and there are lots of autogenerated files, which should be skipped (to reduce manual work on the diffs). cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 09:01:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 15:01:49 +0200 Subject: [Vtigercrm-developers] jens' tree vs 5.1_jens Message-ID: <20070507130149.GB999@nibiru.local> Hi folks, Jens has sent me his personal tree (which he considered stable). There're a lot of differences to the 5.1_jens branch in SVN. I'm currently working on merging his changes and putting them into a couple of patch files. Would be great if they'd go into SVN very soon. In the next step we should merge this branch with the current trunk. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 14:00:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 20:00:41 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount Message-ID: <20070508180041.GA4205@nibiru.local> Hi folks, while just filing an invoice, I got into big trouble: It refuses non-integer amounts ! For service billing this is really bad. You can't assume, all works are done in an hourly raster. How can I fix this ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Tue May 8 14:47:20 2007 From: joe at tsolucio.com (Joe Bordes) Date: Tue, 08 May 2007 20:47:20 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <20070508180041.GA4205@nibiru.local> References: <20070508180041.GA4205@nibiru.local> Message-ID: <4640C5B8.2010601@tsolucio.com> Hi, Look in the forums/wiki, it has something to do with changing the type of a field in vtiger_inventoryproductrel Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > while just filing an invoice, I got into big trouble: > It refuses non-integer amounts ! > > For service billing this is really bad. You can't assume, all > works are done in an hourly raster. > > How can I fix this ? > > > cu > From weigelt at metux.de Tue May 8 15:01:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:01:07 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <4640C5B8.2010601@tsolucio.com> References: <20070508180041.GA4205@nibiru.local> <4640C5B8.2010601@tsolucio.com> Message-ID: <20070508190106.GA17322@nibiru.local> * Joe Bordes schrieb: Hi, > Look in the forums/wiki, it has something to do with changing > the type of a field in vtiger_inventoryproductrel why the hell the quantity an int instead of numeric ?! In which places do I have to change it to fix it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:34:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:34:33 +0200 Subject: [Vtigercrm-developers] RFC: schema versioning Message-ID: <20070508193433.GB17322@nibiru.local> Hi folks, as some of you probably might have realized that upgrading database schema is an very tricky issue. I don't believe that an universal schema generator and updater, which really *WORKS* can be built with reasonable effort, at least not if the RDBMS should not just be abused as spreadsheet storage. The various RDBMS'es *are* different and so require different schemata. The big problem is not writing proper SQL commands, but keeping track of current schema version and find the right commands for update. So my suggestion: * add an new table "schema_version" which contains an list of schema components (identified by some unique name) and their current version (which is an sequential number). * schema updates are done, for each component separately, strictly sequential. each RDBMS has its own SQL scripts. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:41:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:41:33 +0200 Subject: [Vtigercrm-developers] [BUG] Invoice: Disturbing noise when w/ multiple articles of same type Message-ID: <20070508194133.GC17322@nibiru.local> Hi folks, why does it give this disturbing noise when putting multiple artiles of the same type on one invoice ? For services this is really ugly. Obviously you don't have an separate product for every little piece you've done for the customer. The article is simply working time, amount of "1" means 1 hour ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:48:03 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:48:03 +0200 Subject: [Vtigercrm-developers] Requesting trac access Message-ID: <20070508194803.GD17322@nibiru.local> Hi folks, as I'm currenly discovering lots of bugs, I'd like to get trac access to file them there. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:52:46 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:52:46 +0200 Subject: [Vtigercrm-developers] [BUG] cannot change my company name Message-ID: <20070508195245.GE17322@nibiru.local> Hi folks, I cannot change my company name. No matter what I do, it remains "vtiger". How can I get this fixed ASAP ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 16:25:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 22:25:20 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! Message-ID: <20070508202520.GF17322@nibiru.local> This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gharris at teamexpansion.org Tue May 8 16:41:06 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 16:41:06 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> Message-ID: Who in the world are you and why are you cursing all over the place!!!! Thanks, Greg Harris ---------- Original Message ---------- FROM: Enrico Weigelt TO: vtiger support DATE: Tue, 8 May 2007 22:25:20 +0200 SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From jorge.torres.maldonado at gmail.com Tue May 8 16:49:54 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 8 May 2007 16:49:54 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: References: <20070508202520.GF17322@nibiru.local> Message-ID: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Hi, I believe BUG reporting is very important, no matter who in planet one may be. Cheers, On 5/8/07, Greg Harris wrote: > > Who in the world are you and why are you cursing all over the place!!!! > > Thanks, > > Greg Harris > > > > ---------- Original Message ---------- > > FROM: Enrico Weigelt > TO: vtiger support > DATE: Tue, 8 May 2007 22:25:20 +0200 > > SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! > > > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/d8b9195b/attachment.html From gharris at teamexpansion.org Tue May 8 17:13:00 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 17:13:00 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/a8cdeb4d/attachment-0002.html From tzenk at gmx.net Tue May 8 18:40:10 2007 From: tzenk at gmx.net (Torsten Zenk) Date: Wed, 09 May 2007 00:40:10 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> References: <20070508202520.GF17322@nibiru.local> Message-ID: <4640FC4A.1050703@gmx.net> Yeah, Bug reporting in a neutral way is very important, but we don?t need any personal emotions in a bug report, so wether it is ...what the hell....or it is.....who are you...just report and keep your emotions for the forum and your wife ;) Torsten Enrico Weigelt schrieb: > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > From gopals at vtiger.com Tue May 8 22:20:11 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 09 May 2007 07:50:11 +0530 Subject: [Vtigercrm-developers] Requesting trac access In-Reply-To: <20070508194803.GD17322@nibiru.local> References: <20070508194803.GD17322@nibiru.local> Message-ID: <46412FDB.9080001@vtiger.com> Hi, I've enabled trac access for you. Shortly you will receive login details in a separate mail. URL: http://vtiger.fosslabs.com Regards, Gopal Enrico Weigelt wrote: > Hi folks, > > as I'm currenly discovering lots of bugs, I'd like to get trac > access to file them there. > > cu > From weigelt at metux.de Wed May 9 07:27:30 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:27:30 +0200 Subject: [Vtigercrm-developers] RFC: add function getCurrentOrgDetails() Message-ID: <20070509112730.GA16156@nibiru.local> Hi folks, there are several points where the information of the current organisation is retrieved on pedestrian ways (several SQL queries, object creations, etc). Such things are an good place for bugs, so we should reduce them as much as possible. So I suggest introducing an new function "getEntityOrgDetails()", which retrieves that information by the given $crmid. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:28:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:28:41 +0200 Subject: [Vtigercrm-developers] TeX printing Message-ID: <20070509112841.GB16156@nibiru.local> Hi folks, is anyone working on TeX based printing (ie. Invoices) ? Otherwise I'll take care of it. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:42:40 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:42:40 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org Message-ID: <20070509114240.GC16156@nibiru.local> Hi folks, could anyone please explain what the table vtiger_entity2org actually is for ? As far as I understood it, we map the entities (ie. users are entities ?) to the organisation. Now I wonder if an entity can be associated to more than one organisation. If not, it's trivial to move that information directly to the entity's record and skip (maybe drop) this table. BTW: AFAIK we use the org's *NAME* here, not the (numerical) ID or some unique ident. That's a really bad idea, ie. makes changing the org name very, very complicated. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 08:06:21 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:06:21 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509112841.GB16156@nibiru.local> References: <20070509112841.GB16156@nibiru.local> Message-ID: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> I was thinking more about a wiki style On 5/9/07, Enrico Weigelt wrote: > > > Hi folks, > > > is anyone working on TeX based printing (ie. Invoices) ? > Otherwise I'll take care of it. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/18ddd9ce/attachment-0002.html From weigelt at metux.de Wed May 9 08:12:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 14:12:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> Message-ID: <20070509121210.GA28731@nibiru.local> * Jorge Torres schrieb: > I was thinking more about a wiki style How can it assist in rendering high quality preprints ? Is there any good rendering engine for this out there we can use ? The wiki syntax is good for easy editing of hypertext, but driving an print from db content is an completely different issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 08:49:32 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:49:32 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509121210.GA28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> Message-ID: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Enrico, You are right, latex is about high quality prints, still you have to make a document class for what you want and so on, and I dont know a way about extracting db content from latex, I thought that (extracting db contents) could be easier achieved in a wiki syntax way, and precisely because of wiki's "easy-fast editing" it would be perfect for end user applications. Also wiki to xml shouldn't be that complicated, having data in XML; a XSL template can be very simple to describe (much more easier than latex class), there are xsl "rendering" functions for php; the result of xsl(xml) could be html, so you can either send it to the web browser or you can "html to pdf" which is straight forward in php. What do you think? On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > I was thinking more about a wiki style > > How can it assist in rendering high quality preprints ? > Is there any good rendering engine for this out there we can use ? > > The wiki syntax is good for easy editing of hypertext, but driving > an print from db content is an completely different issue. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/85d38641/attachment.html From jorge.torres.maldonado at gmail.com Wed May 9 09:00:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:00:24 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Message-ID: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Enrico, Wait, Now that I think about it, it would be easier to just have vtiger to outputs a printing configuration form in which one textarea has an xml data structure of information that wants to be printed (say "invoice"), then another textarea for your xsl. If so; the only thing one should do, is to describe a xsl template for that xml structure, save, and that's it, next time you want to print, what vtiger would do is to "render" that information, as explained in my last email. Cheers, Jorge On 5/9/07, Jorge Torres wrote: > > Enrico, > > You are right, latex is about high quality prints, still you have to make > a document class for what you want and so on, and I dont know a way about > extracting db content from latex, I thought that (extracting db contents) > could be easier achieved in a wiki syntax way, and precisely because of > wiki's "easy-fast editing" it would be perfect for end user applications. > Also wiki to xml shouldn't be that complicated, having data in XML; a XSL > template can be very simple to describe (much more easier than latex class), > there are xsl "rendering" functions for php; the result of xsl(xml) could be > html, so you can either send it to the web browser or you can "html to pdf" > which is straight forward in php. > > What do you think? > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > I was thinking more about a wiki style > > > > How can it assist in rendering high quality preprints ? > > Is there any good rendering engine for this out there we can use ? > > > > The wiki syntax is good for easy editing of hypertext, but driving > > an print from db content is an completely different issue. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/d40f8d56/attachment-0002.html From weigelt at metux.de Wed May 9 09:35:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:35:44 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <20070509133544.GC28731@nibiru.local> * Jorge Torres schrieb: Hi, > Wait, Now that I think about it, it would be easier to just > have vtiger to outputs a printing configuration form in which > one textarea has an xml data structure of information that > wants to be printed (say "invoice"), then another textarea > for your xsl. If so; the only thing one should do, is to > describe a xsl template for that xml structure, save, and > that's it, next time you want to print, what vtiger would > do is to "render" that information, as explained in my last email. Again, very complicated for user and coder. Why not just an option in the settings screen, where the user can select renderer and template, and maybe an additional template editing form ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 09:39:42 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 15:39:42 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509114240.GC16156@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 01:42:40PM +0200 References: <20070509114240.GC16156@nibiru.local> Message-ID: <20070509153942.B3824@Strawberry.COM> Hi, it can be assigned to more than one organization. There is a 'primary' column in the entity2org table which defines the primary organization - the one that really 'owns' the entity. Jens On Wed, May 09, 2007 at 01:42:40PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > could anyone please explain what the table vtiger_entity2org > actually is for ? > > As far as I understood it, we map the entities (ie. users are > entities ?) to the organisation. > > Now I wonder if an entity can be associated to more than one > organisation. If not, it's trivial to move that information > directly to the entity's record and skip (maybe drop) this table. > > > BTW: AFAIK we use the org's *NAME* here, not the (numerical) > ID or some unique ident. That's a really bad idea, ie. makes > changing the org name very, very complicated. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 09:44:00 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 15:44:00 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <4641D020.60605@tsolucio.com> Hi, Why not use the merge system that is already in vtiger? I have enhanced the merge system based on forum code and I have added merge to SO very easily. Now my client can create word, openoffice or RTF documents using their favorite document processor as if they made any other template. What advantage is there in TeX? Joe TSolucio Jorge Torres escribi?: > Enrico, From weigelt at metux.de Wed May 9 09:45:37 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:45:37 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509153942.B3824@Strawberry.COM> References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> Message-ID: <20070509134537.GD28731@nibiru.local> * Jens Hamisch schrieb: Hi, > it can be assigned to more than one organization. > There is a 'primary' column in the entity2org table which defines the > primary organization - the one that really 'owns' the entity. hmm, meanwhile I've found some pieces of code (in the invoice module) which explicitly break if the we have more than one org per entity (AFAIK). So what's correct now ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 09:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:47:48 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <20070509134748.GE28731@nibiru.local> * Joe Bordes schrieb: Hi, > Why not use the merge system that is already in vtiger? Well, actually, I never heared about that. > What advantage is there in TeX? High quality preprints ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 09:49:45 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:49:45 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Sounds great, but i dont get how is it that you get DB info from client's, word, openoffice. Thanks, Jorge On 5/9/07, Joe Bordes wrote: > > Hi, > > Why not use the merge system that is already in vtiger? > I have enhanced the merge system based on forum code and I have added > merge to SO very easily. Now my client can create word, openoffice or > RTF documents using their favorite document processor as if they made > any other template. > What advantage is there in TeX? > > Joe > TSolucio > > Jorge Torres escribi?: > > Enrico, > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/850e0d7c/attachment.html From jens at Strawberry.COM Wed May 9 10:00:11 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 16:00:11 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509134537.GD28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 03:45:37PM +0200 References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> <20070509134537.GD28731@nibiru.local> Message-ID: <20070509160011.E3824@Strawberry.COM> Hi, do you have some more detailed information on that? Could be either a bug or something missed in the port of my changes to 5.0.3. Jens On Wed, May 09, 2007 at 03:45:37PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > it can be assigned to more than one organization. > > There is a 'primary' column in the entity2org table which defines the > > primary organization - the one that really 'owns' the entity. > > hmm, meanwhile I've found some pieces of code (in the invoice module) > which explicitly break if the we have more than one org per > entity (AFAIK). > > So what's correct now ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 10:02:21 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:02:21 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Message-ID: <20070509140221.GF28731@nibiru.local> * Jorge Torres schrieb: Hi, > Sounds great, but i dont get how is it that you get DB info > from client's, word, openoffice. Are we still talking about the same thing ? I'm working on invoice pdf rendering, which is entirely done on the server. Other formats, ie. OO could be generated the same way. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 10:16:48 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 10:16:48 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Enrico, Yes, from I want it to do it from server side. It seems that I don't get what this merge system does, I understood from Jen's suggestion: that users could work their templates at client side, is this correct?, if so, how would they get DB data or data content structure from clients editor. Rendering setup Option in settings screen as Enrico mentioned would be perfect. On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > Sounds great, but i dont get how is it that you get DB info > > from client's, word, openoffice. > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/c1f5479b/attachment-0001.html From weigelt at metux.de Wed May 9 10:23:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:23:28 +0200 Subject: [Vtigercrm-developers] organization ident Message-ID: <20070509142328.GH28731@nibiru.local> Hi folks, I've found an big-fat problem with the organization modeling in the DB: The org is always referenced by its name ! To be clear: its the *printable* name, which appears for example on the bill. So now it's clear, why it cannot be changed in the settings ;-O It appears the name is also abused as ident, which is the key problem. There's no additional ID here. To fix this, we have two options: a) Add an numerical ID to the organization table and fix all the schema to reference on that. This would probably be the most clean model, but requires much care on schema updates. b) Add an new text field (ie. "official_name") which now carries the actual *name* (ie. for printing on the invoice) and leave evrything else untouched. Nearly trivial to implement, but maybe not very clean design. Comments ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 10:33:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:33:35 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Message-ID: <20070509143335.GI28731@nibiru.local> * Jorge Torres schrieb: > if so, how would they get DB data or data content structure > from clients editor. Simply add some new button which calls the invoice rendering with an different engine / output format ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 10:59:10 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 16:59:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <4641E1BE.80207@tsolucio.com> Yes, we are still talking about the same thing. Please take a look at the existng merge system for accounts. The idea is that you open up OO and write the template, where you want the contact name (for example) you put CONTACT_NAME and this gets substituted dynamically when you choose the template and the contact. If we add this feature to invoice, you could write your invoice in word and use INVOICE_NUMBER or INVOICE_DATE for example. That is basically what I have working. Joe TSolucio Enrico Weigelt escribi?: > * Jorge Torres schrieb: > > Hi, > > >> Sounds great, but i dont get how is it that you get DB info >> from client's, word, openoffice. >> > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > From weigelt at metux.de Wed May 9 11:12:19 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:12:19 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641E1BE.80207@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> Message-ID: <20070509151219.GJ28731@nibiru.local> * Joe Bordes schrieb: Hi, > Please take a look at the existng merge system for accounts. Where is it ? > The idea is that you open up OO and write the template, where you want > the contact name (for example) you put CONTACT_NAME and this gets > substituted dynamically when you choose the template and the contact. > If we add this feature to invoice, you could write your invoice in word > and use INVOICE_NUMBER or INVOICE_DATE for example. Actually, I'm not interested in having to cope with blobs like OO, neither do I have anything to do w/ M$ crap. That's totally irrelevant to me. All I want is that the already existing pdf generation stuff produces an high quality pdf preprint for my bills - w/o requiring any manual intervention. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 11:15:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 17:15:35 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509142328.GH28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 04:23:28PM +0200 References: <20070509142328.GH28731@nibiru.local> Message-ID: <20070509171535.F3824@Strawberry.COM> Hi, or opportunity c) handle organization and orgunit as yet another CRMEntities would be the best fit into the internal vtiger design for my point of view. The effort would be even more than just introducing an orgid (code-changes and cleanups), but from the maintainability point of view it would be a clear and straight forward solution. Jens On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I've found an big-fat problem with the organization modeling in > the DB: > > The org is always referenced by its name ! > To be clear: its the *printable* name, which appears for example > on the bill. > > So now it's clear, why it cannot be changed in the settings ;-O > > It appears the name is also abused as ident, which is the key > problem. There's no additional ID here. > > To fix this, we have two options: > > a) Add an numerical ID to the organization table and fix all the > schema to reference on that. This would probably be the most > clean model, but requires much care on schema updates. > > b) Add an new text field (ie. "official_name") which now carries > the actual *name* (ie. for printing on the invoice) and leave > evrything else untouched. Nearly trivial to implement, but maybe > not very clean design. > > > > Comments ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 11:26:50 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:26:50 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <4641E83A.2030603@tsolucio.com> Very good idea!! Joe TSolucio Jens Hamisch escribi?: > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities > > > would be the best fit into the internal vtiger design for my > point of view. > > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. > > > Jens > > > > On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > >> Hi folks, >> >> >> I've found an big-fat problem with the organization modeling in >> the DB: >> >> The org is always referenced by its name ! >> To be clear: its the *printable* name, which appears for example >> on the bill. >> >> So now it's clear, why it cannot be changed in the settings ;-O >> >> It appears the name is also abused as ident, which is the key >> problem. There's no additional ID here. >> >> To fix this, we have two options: >> >> a) Add an numerical ID to the organization table and fix all the >> schema to reference on that. This would probably be the most >> clean model, but requires much care on schema updates. >> >> b) Add an new text field (ie. "official_name") which now carries >> the actual *name* (ie. for printing on the invoice) and leave >> evrything else untouched. Nearly trivial to implement, but maybe >> not very clean design. >> >> >> >> Comments ? >> >> cu >> -- >> --------------------------------------------------------------------- >> Enrico Weigelt == metux IT service >> >> phone: +49 36207 519931 www: http://www.metux.de/ >> fax: +49 36207 519932 email: contact at metux.de >> cellphone: +49 174 7066481 >> --------------------------------------------------------------------- >> -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- >> --------------------------------------------------------------------- >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > From jorge.torres.maldonado at gmail.com Wed May 9 11:28:10 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 11:28:10 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509151219.GJ28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> Message-ID: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Hi, I don't see why having other formats output support would be a problem, Jen's idea of having templates done in OO or others, is great; simply make your template on whatever editor you prefer, M$, OO, vi. upload and next time you generate invoices, buy orders, or as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, but I certainly want to see Jens work, where can I get it? Thanks, Jorge On 5/9/07, Enrico Weigelt wrote: > > * Joe Bordes schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the contact. > > If we add this feature to invoice, you could write your invoice in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/8a056c99/attachment-0001.html From weigelt at metux.de Wed May 9 11:27:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:27:49 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <20070509152749.GK28731@nibiru.local> * Jens Hamisch schrieb: > > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities What does that exactly mean ? Schema change necessary for that ? > would be the best fit into the internal vtiger design for my > point of view. ACK. > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. ACK. So: what has to be done for that ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 11:39:01 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:39:01 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <4641EB15.70205@tsolucio.com> http://forums.vtiger.com/viewtopic.php?t=14501 Jorge Torres escribi?: > Hi, > > I don't see why having other formats output support would be a > problem, Jen's idea of having templates done in OO or others, is > great; simply make your template on whatever editor you prefer, M$, > OO, vi. upload and next time you generate invoices, buy orders, or > as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont > know if those are Jen's plans, but I certainly want to see Jens > work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, *Enrico Weigelt* > wrote: > > * Joe Bordes > schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where > you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the > contact. > > If we add this feature to invoice, you could write your invoice > in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From jens at Strawberry.COM Wed May 9 12:02:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:02:37 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com>; from Jorge Torres on Wed, May 09, 2007 at 11:28:10AM -0400 References: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <20070509180237.G3824@Strawberry.COM> Hi, I'd prefer a solution that is more generic. The thing I'm not happy about is to introduce another dependency into vtiger. However if it becomes necessary, than I'd suggest to focus on more actual products than latex. OpenOffice and StarOffice both support the open document standard. I don't know if M$ will support it some day, too, but the office suites mentioned above both run on all operation systems. Finally those who just want to read and print an invoice may do not have to install the entire office suite. They may use the document viewers available. There's another thing I'm missing in vtiger: document management. vtiger's slogan is to reflect an entire customer life cycle. Today we have campains, quotes, sales-order and invoices. There are open issues like contracts and statements that are missing. But this is just a more or less 'technical' point of view. What about all the letters written to (and received from) a customer. This is also part of the life-cycle and therefor should be managed by vtiger. Thus: what we need is an interface to the office suites. And the logical consequence would be: All documents produced by vtiger should be based on the same standard as the documents managed by vtiger. Than it would be easy to manage self-produced documents as any other documents, too. My conclusion: Use the open document standard instead of latex. Jens On Wed, May 09, 2007 at 11:28:10AM -0400, Jorge Torres wrote: > Hi, > > I don't see why having other formats output support would be a problem, > Jen's idea of having templates done in OO or others, is great; simply make > your template on whatever editor you prefer, M$, OO, vi. upload and next > time you generate invoices, buy orders, or as the case might be, you > have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, > but I certainly want to see Jens work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Joe Bordes schrieb: > > > > Hi, > > > > > Please take a look at the existng merge system for accounts. > > > > Where is it ? > > > > > The idea is that you open up OO and write the template, where you want > > > the contact name (for example) you put CONTACT_NAME and this gets > > > substituted dynamically when you choose the template and the contact. > > > If we add this feature to invoice, you could write your invoice in word > > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > > > Actually, I'm not interested in having to cope with blobs like OO, > > neither do I have anything to do w/ M$ crap. That's totally > > irrelevant to me. > > > > All I want is that the already existing pdf generation stuff > > produces an high quality pdf preprint for my bills - w/o requiring > > any manual intervention. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 9 12:06:40 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:06:40 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509152749.GK28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 05:27:49PM +0200 References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> <20070509152749.GK28731@nibiru.local> Message-ID: <20070509180640.H3824@Strawberry.COM> Hi, regarding the schema: just introduce an organization ID and add a constraint to the CRMEntity table. (IMHO orgunit already has an orgunitid - w/o looking at the code). code changes are more complex: Mainly the Save methods have to be reviewed whether they may be reduced to the super class methods. Jens On Wed, May 09, 2007 at 05:27:49PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > > > Hi, > > > > > > or opportunity > > > > c) handle organization and orgunit as yet another CRMEntities > > What does that exactly mean ? > Schema change necessary for that ? > > > would be the best fit into the internal vtiger design for my > > point of view. > > ACK. > > > The effort would be even more than just introducing an orgid > > (code-changes and cleanups), but from the maintainability point > > of view it would be a clear and straight forward solution. > > ACK. > > So: what has to be done for that ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 14:57:58 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 20:57:58 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509180237.G3824@Strawberry.COM> References: <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> Message-ID: <20070509185758.GM28731@nibiru.local> * Jens Hamisch schrieb: Hi, > I'd prefer a solution that is more generic. well, my approach is quite generic ;-p > The thing I'm not happy about is to introduce another > dependency into vtiger. Fearing dependencies is what makes projects really fat and unmaintainable. Mozilla is an good (bad) example for that ;P BTW: you don't need to have (la)tex. You can use some other renderer (ie. fpdf-based, plain html, ...) > However if it becomes necessary, than I'd suggest to focus > on more actual products than latex. Yes, Latex is quite old, but it's also quite, quite stable. Coding activity is no appropriate indicator on quality. > OpenOffice and StarOffice both support the open document standard. Nice. Do you expect me to have that blod installed+running just to get an pdf bill ? > I don't know if M$ will support it some day, too, but the office > suites mentioned above both run on all operation systems. Finally > those who just want to read and print an invoice may do not have > to install the entire office suite. They may use the document > viewers available. I do *not* want any bit in some $office_format. I just want to have my bills as pdf w/ *my* custom layout. Latex is an very proven approach. > There's another thing I'm missing in vtiger: document management. Ugh, that's another story ... > And the logical consequence would be: All documents produced by > vtiger should be based on the same standard as the documents managed > by vtiger. Than it would be easy to manage self-produced documents > as any other documents, too. Interface != Storage/Encoding/Format. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From javawaba at hotmail.com Wed May 9 20:14:27 2007 From: javawaba at hotmail.com (Jim Weir) Date: Wed, 09 May 2007 20:14:27 -0400 Subject: [Vtigercrm-developers] ?? Message-ID: how do I unsubscribe from this list? _________________________________________________________________ Catch suspicious messages before you open them?with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 From brett.hooker at roarz.com Wed May 9 23:24:05 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 10 May 2007 13:24:05 +1000 Subject: [Vtigercrm-developers] VT5 Outlook Plugin Development Questions Message-ID: <46429055.4080208@roarz.com> Team, Which version of VB is used to develop/maintain the VT5 Outlook Plugin? Is there wiki/starter on contributing to the VT5 Outlook Plugin? Thanks, Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/4d8fcdbc/attachment-0001.html From gopals at vtiger.com Thu May 10 00:48:25 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 10 May 2007 10:18:25 +0530 Subject: [Vtigercrm-developers] ?? In-Reply-To: References: Message-ID: <4642A419.3010003@vtiger.com> Hi, You can unsubscribe from the developer list at: http://lists.vtigercrm.com/mailman/listinfo/vtigercrm-developers Thanks, Gopal Jim Weir wrote: > how do I unsubscribe from this list? > > _________________________________________________________________ > Catch suspicious messages before you open them---with Windows Live > Hotmail. > http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/598fe713/attachment-0001.html From jens at Strawberry.COM Thu May 10 03:37:41 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 10 May 2007 09:37:41 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509185758.GM28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 08:57:58PM +0200 References: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> <20070509185758.GM28731@nibiru.local> Message-ID: <20070510093741.B7494@Strawberry.COM> Hi, > I do *not* want any bit in some $office_format. I just want to > have my bills as pdf w/ *my* custom layout. Latex is an very > proven approach. let's get back to the generic solution: (la)tex is not standard on Unix platforms, but (g|t|n)roff and tbl is! Those provide enough features to produce high quality formulars. And they do not intro- duce another prerequisite. I havn't had a look at what finally came into the 5.0.3 branch. But I already introduced different pdf templates for all organizations and orgunits ... > > There's another thing I'm missing in vtiger: document management. > > Ugh, that's another story ... > > > And the logical consequence would be: All documents produced by > > vtiger should be based on the same standard as the documents managed > > by vtiger. Than it would be easy to manage self-produced documents > > as any other documents, too. > > Interface != Storage/Encoding/Format. Agree. A document management should be capable of handling any format of a document, so Office docs, scans and also latex would not contradict to the document management approach. However, to get more things covered office would be the first choice, because to create letters out of a vtiger attached document management, we need an interface to the office suite (which of course could be simply the creation of a base document that becomes opened). Having this interface, we have evverything at hand to simply create any formular w/o interfacing to yet another monstrum of third party software (which latex definitely is!). Also the latex approach is even more complex, because the templates themselfes prerequisite according latex extensions to be installed (at least may!). In comparison the office suites are monolithic and therefor complete. And finally: latex was and will be forever a system used by some experts. It is not addressed to people thout programming skills. I'm afraid it will not be possible to hand over the template definition to one of your sales and marketing people if it is based on latex. Office keeps this door open ... Jens -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From kenlyle at yahoo.com Thu May 10 10:12:38 2007 From: kenlyle at yahoo.com (Ken Lyle) Date: Thu, 10 May 2007 07:12:38 -0700 (PDT) Subject: [Vtigercrm-developers] Document Management In-Reply-To: Message-ID: <448400.55472.qm@web36405.mail.mud.yahoo.com> I have attended a few webinars from Alfresco, and they seem to have a good open source document management and web content management system. I have the impression that they are very standards compliant, like WebDAV, and something that makes their repository show up as a shared drive, and have some cool toys like rules that do automatic format conversions, say of each .doc to a PDF for the archive version. It seems like it should be only a 'loose dependency', which might make everyone happy. And, for the merging itself, maybe can use GoogleApps, or ThinkFree, or one of the free web suites that will save to .doc, .pdf, etc. That seems like a dependency that actually liberates the developers, the users, and their IT staffs from deploying software. Maybe you wizards can run with one of these ideas... Ken Think bigger than 'left' vs. 'right'- basic freedoms are under attack- http://www.healthfreedomusa.org/index.php/?cat=2 From weigelt at metux.de Thu May 10 11:19:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:19:20 +0200 Subject: [Vtigercrm-developers] [PATCH] 5.1_jens vs. jens' private Message-ID: <20070510151920.GA25395@nibiru.local> Hi folks, here's a bunch of patches between the 5.1_jens branch and jens's private tree, cleaned up a little bit. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/database/Postgres8.php htdocs/include/database/Postgres8.php --- orig/include/database/Postgres8.php 2007-05-04 16:11:49.000000000 +0200 +++ htdocs/include/database/Postgres8.php 2007-05-07 14:23:49.000000000 +0200 @@ -1,144 +1,144 @@ -info( "fixPostgresQuery: ".$query); - - // If we already have an order or group cluase separate ist for later use - if( strpos($queryRecord,'GROUP') > 0) - { - $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); - if( strpos($groupClause,'ORDER') > 0) - { - $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); - $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); - } - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); - } - - if( strpos($queryRecord,'ORDER') > 0) - { - $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); - } - - // Construkt the privateGroupList from the filed list by separating combined - // record.field entries - $privateGroupList = array(); - $token = strtok( $queryFields, ", () "); - while( $token !== false) { - if( strpos( $token, ".") !== false) { - array_push( $privateGroupList, $token); - } - $token = strtok( ", () "); - } - sort( $privateGroupList); - $groupFields = ""; - $last = ""; - for( $i = 0; $i < count($privateGroupList); $i++) { - if( $last != $privateGroupList[$i]) { - if( $groupFields == "") - $groupFields = $privateGroupList[$i]; - else - $groupFields .= ",".$privateGroupList[$i]; - } - $last = $privateGroupList[$i]; - } - - // Rebuild the query - $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; - if( $groupClause != "" ) - $groupClause = $groupClause.",".$groupFields; - else - $groupClause = $groupFields; - $query .= expandStar($groupClause,$log)." ".$orderClause; - - if( $debug) - $log->info( "fixPostgresQuery result: ".$query); - - return( $query); -} - -// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause -function expandStar($fieldlist,$log) -{ - $expanded=""; - $field = strtok( $fieldlist, ","); - while( $field != "") - { - //remove leading and trailing spaces - $field = trim( $field); - - //still spaces in the field indicate a complex structure - if( strpos( $field, " ") == 0) - { - - //locate table- and fieldname - $pos = strpos( $field, "."); - if( $pos > 0) - { - $table = substr( $field, 0, $pos); - $subfield = substr( $field, $pos+1, strlen($field)-$pos); - - //do we need to expand? - if( $subfield == "*") - $field = expandRecord($table,$log); - } - - //add the propably expanded field to the querylist - if( $expanded == "") - $expanded = $field; - else - $expanded .= ",".$field; - } - - //next field - $field = strtok(","); - } - - //return the expanded fieldlist - return( $expanded); -} - -//return an expanded table field list -function expandRecord($table,$log) -{ +info( "fixPostgresQuery: ".$query); + + // If we already have an order or group cluase separate ist for later use + if( strpos($queryRecord,'GROUP') > 0) + { + $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); + if( strpos($groupClause,'ORDER') > 0) + { + $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); + $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); + } + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); + } + + if( strpos($queryRecord,'ORDER') > 0) + { + $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); + } + + // Construkt the privateGroupList from the filed list by separating combined + // record.field entries + $privateGroupList = array(); + $token = strtok( $queryFields, ", () "); + while( $token !== false) { + if( strpos( $token, ".") !== false) { + array_push( $privateGroupList, $token); + } + $token = strtok( ", () "); + } + sort( $privateGroupList); + $groupFields = ""; + $last = ""; + for( $i = 0; $i < count($privateGroupList); $i++) { + if( $last != $privateGroupList[$i]) { + if( $groupFields == "") + $groupFields = $privateGroupList[$i]; + else + $groupFields .= ",".$privateGroupList[$i]; + } + $last = $privateGroupList[$i]; + } + + // Rebuild the query + $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; + if( $groupClause != "" ) + $groupClause = $groupClause.",".$groupFields; + else + $groupClause = $groupFields; + $query .= expandStar($groupClause,$log)." ".$orderClause; + + if( $debug) + $log->info( "fixPostgresQuery result: ".$query); + + return( $query); +} + +// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause +function expandStar($fieldlist,$log) +{ + $expanded=""; + $field = strtok( $fieldlist, ","); + while( $field != "") + { + //remove leading and trailing spaces + $field = trim( $field); + + //still spaces in the field indicate a complex structure + if( strpos( $field, " ") == 0) + { + + //locate table- and fieldname + $pos = strpos( $field, "."); + if( $pos > 0) + { + $table = substr( $field, 0, $pos); + $subfield = substr( $field, $pos+1, strlen($field)-$pos); + + //do we need to expand? + if( $subfield == "*") + $field = expandRecord($table,$log); + } + + //add the propably expanded field to the querylist + if( $expanded == "") + $expanded = $field; + else + $expanded .= ",".$field; + } + + //next field + $field = strtok(","); + } + + //return the expanded fieldlist + return( $expanded); +} + +//return an expanded table field list +function expandRecord($table,$log) +{ global $adb; $result = ""; $subfields = $adb->getColumnNames($table); - - //construct an entity string - for( $i=0; $i 0) - $result = substr( $result, 0, strlen( $result) -1); - - //return out new string - return( $result); -} -?> + + //construct an entity string + for( $i=0; $i 0) + $result = substr( $result, 0, strlen( $result) -1); + + //return out new string + return( $result); +} +?> -------------- next part -------------- diff -ruN orig/data/SugarBean.php htdocs/data/SugarBean.php --- orig/data/SugarBean.php 2007-05-04 16:11:47.000000000 +0200 +++ htdocs/data/SugarBean.php 2007-05-07 14:40:44.000000000 +0200 @@ -1,451 +1,451 @@ -id) || $this->id == "") - { - $isUpdate = false; - } - - if ( $this->new_with_id == true ) - { - $isUpdate = false; - } - - //$this->date_modified = $this->db->formatDate(date('YmdHis')); - $this->date_modified = date('YmdHis'); - if (isset($current_user)) $this->modified_user_id = $current_user->id; - - if($isUpdate) - { - $query = "Update ".$this->table_name." set "; - } - else - { - //$this->date_entered = $this->db->formatDate(date('YmdHis')); - $this->date_entered = date('YmdHis'); - - if($this->new_schema && - $this->new_with_id == false) - { - $this->id = $this->db->getUniqueID("vtiger_users"); - } - - $query = "INSERT into ".$this->table_name; - } - // todo - add date modified to the list. - - // write out the SQL statement. - //$query .= $this->table_name." set "; - - $firstPass = 0; - $insKeys = '('; - $insValues = '('; - $updKeyValues=''; - foreach($this->column_fields as $field) - { - // Do not write out the id vtiger_field on the update statement. - // We are not allowed to change ids. - if($isUpdate && ('id' == $field)) - continue; - - // Only assign variables that have been set. - if(isset($this->$field)) - { - // Try comparing this element with the head element. - if(0 == $firstPass) - { - $firstPass = 1; - } - else - { - if($isUpdate) - { - $updKeyValues = $updKeyValues.", "; - } - else - { - $insKeys = $insKeys.", "; - $insValues = $insValues.", "; - } - } - /*else - $query = $query.", "; - - $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; - */ - if($isUpdate) - { - $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - else - { - $insKeys = $insKeys.$field; - $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - } - } - - if($isUpdate) - { - $query = $query.$updKeyValues." WHERE ID = '$this->id'"; - $this->log->info("Update $this->object_name: ".$query); - } - else - { - $query = $query.$insKeys.") VALUES ".$insValues.")"; - $this->log->info("Insert: ".$query); - } - - $this->db->query($query, true); - - // If this is not an update then store the id for later. - if(!$isUpdate && !$this->new_schema && !$this->new_with_id) - { - $this->db->println("Illegal Access - SugarBean"); - //this is mysql specific - $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); - } - - return $this->id; - } - - - /** - * This function retrieves a record of the appropriate type from the DB. - * It fills in all of the vtiger_fields from the DB into the object it was called on. - * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. - * returns this - The object that it was called apon or null if exactly 1 record was not found. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - function retrieve($id = -1, $encodeThis=true) { - if ($id == -1) { - $id = $this->id; - } - if($id == '') { - return null; - } -// GS porting vtiger_crmentity -$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; -// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; - $this->log->debug("Retrieve $this->object_name: ".$query); - - $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); - - if(empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result, -1, $encodeThis); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - */ - - function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { - $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); - - $query = $this->create_list_query($order_by, $where); - - return $this->process_list_query($query, $row_offset, $limit, $max); - } - - /** - * This function returns a full (ie non-paged) list of the current object type. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function get_full_list($order_by = "", $where = "") { - $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - $result =& $this->db->query($query, false); - - if($this->db->getRowCount($result) > 0){ - - // We have some data. - while ($row = $this->db->fetchByAssoc($result)) { - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else { - $this->$field = ''; - } - } - - - $list[] = clone($this); //added clone tosupport PHP5 - } - } - - if (isset($list)) return $list; - else return null; - - } - - function create_list_query($order_by, $where) - { - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - return $query; - } - - - function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) - { - global $list_max_entries_per_page; - $this->log->debug("process_list_query: ".$query); - if(!empty($limit) && $limit != -1){ - $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); - }else{ - $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); - } - - $list = Array(); - if($max_per_page == -1){ - $max_per_page = $list_max_entries_per_page; - } - $rows_found = $this->db->getRowCount($result); - - $this->log->debug("Found $rows_found ".$this->object_name."s"); - - $previous_offset = $row_offset - $max_per_page; - $next_offset = $row_offset + $max_per_page; - - if($rows_found != 0) - { - - // We have some data. - - for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - - $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else - { - $this->$field = ""; - } - } - - - $list[] = clone($this); //added clone to support PHP5 - } - } - - $response = Array(); - $response['list'] = $list; - $response['row_count'] = $rows_found; - $response['next_offset'] = $next_offset; - $response['previous_offset'] = $previous_offset; - - return $response; - } - - - /** - * Track the viewing of a detail record. This leverages get_summary_text() which is object specific - * params $user_id - The user that is viewing the record. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function track_view($user_id, $current_module,$id='') - { - $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); - - $tracker = new Tracker(); - $tracker->track_view($user_id, $current_module, $id, ''); - } - - - /** This function should be overridden in each module. It marks an item as deleted. - * If it is not overridden, then marking this type of item is not allowed - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function mark_deleted($id) - { - $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; - $this->db->query($query, true,"Error marking record deleted: "); - - $this->mark_relationships_deleted($id); - - // Take the item off of the recently viewed lists. - $tracker = new Tracker(); - $tracker->delete_item_history($id); - - } - - - /* This is to allow subclasses to fill in row specific columns of a list view form - function list_view_parse_additional_sections(&$list_form) - { - } - */ - /* This function assigns all of the values into the template for the list view - function get_list_view_array(){ - $return_array = Array(); - - foreach($this->list_fields as $field) - { - $return_array[strtoupper($field)] = $this->$field; - } - - return $return_array; - } - function get_list_view_data() - { - - return $this->get_list_view_array(); - } - - function get_where(&$fields_array) - { - $where_clause = "WHERE "; - $first = 1; - foreach ($fields_array as $name=>$value) - { - if ($first) - { - $first = 0; - } - else - { - $where_clause .= " AND "; - } - - $where_clause .= "$name = ".$adb->quote($value).""; - } - - $where_clause .= " AND deleted=0"; - return $where_clause; - } - - - function retrieve_by_string_fields($fields_array, $encode=true) - { - $where_clause = $this->get_where($fields_array); - - $query = "SELECT * FROM $this->table_name $where_clause"; - $this->log->debug("Retrieve $this->object_name: ".$query); - $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); - if( empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result,-1, $encode); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - - // this method is called during an import before inserting a bean - // define an associative array called $special_fields - // the keys are user defined, and don't directly map to the bean's vtiger_fields - // the value is the method name within that bean that will do extra - // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' - - function process_special_fields() - { - foreach ($this->special_functions as $func_name) - { - if ( method_exists($this,$func_name) ) - { - $this->$func_name(); - } - } - } - - */ -} - - -?> +id) || $this->id == "") + { + $isUpdate = false; + } + + if ( $this->new_with_id == true ) + { + $isUpdate = false; + } + + //$this->date_modified = $this->db->formatDate(date('YmdHis')); + $this->date_modified = date('YmdHis'); + if (isset($current_user)) $this->modified_user_id = $current_user->id; + + if($isUpdate) + { + $query = "Update ".$this->table_name." set "; + } + else + { + //$this->date_entered = $this->db->formatDate(date('YmdHis')); + $this->date_entered = date('YmdHis'); + + if($this->new_schema && + $this->new_with_id == false) + { + $this->id = $this->db->getUniqueID("vtiger_users"); + } + + $query = "INSERT into ".$this->table_name; + } + // todo - add date modified to the list. + + // write out the SQL statement. + //$query .= $this->table_name." set "; + + $firstPass = 0; + $insKeys = '('; + $insValues = '('; + $updKeyValues=''; + foreach($this->column_fields as $field) + { + // Do not write out the id vtiger_field on the update statement. + // We are not allowed to change ids. + if($isUpdate && ('id' == $field)) + continue; + + // Only assign variables that have been set. + if(isset($this->$field)) + { + // Try comparing this element with the head element. + if(0 == $firstPass) + { + $firstPass = 1; + } + else + { + if($isUpdate) + { + $updKeyValues = $updKeyValues.", "; + } + else + { + $insKeys = $insKeys.", "; + $insValues = $insValues.", "; + } + } + /*else + $query = $query.", "; + + $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; + */ + if($isUpdate) + { + $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + else + { + $insKeys = $insKeys.$field; + $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + } + } + + if($isUpdate) + { + $query = $query.$updKeyValues." WHERE ID = '$this->id'"; + $this->log->info("Update $this->object_name: ".$query); + } + else + { + $query = $query.$insKeys.") VALUES ".$insValues.")"; + $this->log->info("Insert: ".$query); + } + + $this->db->query($query, true); + + // If this is not an update then store the id for later. + if(!$isUpdate && !$this->new_schema && !$this->new_with_id) + { + $this->db->println("Illegal Access - SugarBean"); + //this is mysql specific + $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); + } + + return $this->id; + } + + + /** + * This function retrieves a record of the appropriate type from the DB. + * It fills in all of the vtiger_fields from the DB into the object it was called on. + * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. + * returns this - The object that it was called apon or null if exactly 1 record was not found. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + function retrieve($id = -1, $encodeThis=true) { + if ($id == -1) { + $id = $this->id; + } + if($id == '') { + return null; + } +// GS porting vtiger_crmentity +$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; +// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; + $this->log->debug("Retrieve $this->object_name: ".$query); + + $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); + + if(empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result, -1, $encodeThis); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + */ + + function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { + $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); + + $query = $this->create_list_query($order_by, $where); + + return $this->process_list_query($query, $row_offset, $limit, $max); + } + + /** + * This function returns a full (ie non-paged) list of the current object type. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_full_list($order_by = "", $where = "") { + $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + $result =& $this->db->query($query, false); + + if($this->db->getRowCount($result) > 0){ + + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else { + $this->$field = ''; + } + } + + + $list[] = clone($this); //added clone tosupport PHP5 + } + } + + if (isset($list)) return $list; + else return null; + + } + + function create_list_query($order_by, $where) + { + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + return $query; + } + + + function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) + { + global $list_max_entries_per_page; + $this->log->debug("process_list_query: ".$query); + if(!empty($limit) && $limit != -1){ + $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); + }else{ + $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); + } + + $list = Array(); + if($max_per_page == -1){ + $max_per_page = $list_max_entries_per_page; + } + $rows_found = $this->db->getRowCount($result); + + $this->log->debug("Found $rows_found ".$this->object_name."s"); + + $previous_offset = $row_offset - $max_per_page; + $next_offset = $row_offset + $max_per_page; + + if($rows_found != 0) + { + + // We have some data. + + for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + + $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else + { + $this->$field = ""; + } + } + + + $list[] = clone($this); //added clone to support PHP5 + } + } + + $response = Array(); + $response['list'] = $list; + $response['row_count'] = $rows_found; + $response['next_offset'] = $next_offset; + $response['previous_offset'] = $previous_offset; + + return $response; + } + + + /** + * Track the viewing of a detail record. This leverages get_summary_text() which is object specific + * params $user_id - The user that is viewing the record. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function track_view($user_id, $current_module,$id='') + { + $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); + + $tracker = new Tracker(); + $tracker->track_view($user_id, $current_module, $id, ''); + } + + + /** This function should be overridden in each module. It marks an item as deleted. + * If it is not overridden, then marking this type of item is not allowed + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function mark_deleted($id) + { + $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; + $this->db->query($query, true,"Error marking record deleted: "); + + $this->mark_relationships_deleted($id); + + // Take the item off of the recently viewed lists. + $tracker = new Tracker(); + $tracker->delete_item_history($id); + + } + + + /* This is to allow subclasses to fill in row specific columns of a list view form + function list_view_parse_additional_sections(&$list_form) + { + } + */ + /* This function assigns all of the values into the template for the list view + function get_list_view_array(){ + $return_array = Array(); + + foreach($this->list_fields as $field) + { + $return_array[strtoupper($field)] = $this->$field; + } + + return $return_array; + } + function get_list_view_data() + { + + return $this->get_list_view_array(); + } + + function get_where(&$fields_array) + { + $where_clause = "WHERE "; + $first = 1; + foreach ($fields_array as $name=>$value) + { + if ($first) + { + $first = 0; + } + else + { + $where_clause .= " AND "; + } + + $where_clause .= "$name = ".$adb->quote($value).""; + } + + $where_clause .= " AND deleted=0"; + return $where_clause; + } + + + function retrieve_by_string_fields($fields_array, $encode=true) + { + $where_clause = $this->get_where($fields_array); + + $query = "SELECT * FROM $this->table_name $where_clause"; + $this->log->debug("Retrieve $this->object_name: ".$query); + $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); + if( empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result,-1, $encode); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + + // this method is called during an import before inserting a bean + // define an associative array called $special_fields + // the keys are user defined, and don't directly map to the bean's vtiger_fields + // the value is the method name within that bean that will do extra + // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' + + function process_special_fields() + { + foreach ($this->special_functions as $func_name) + { + if ( method_exists($this,$func_name) ) + { + $this->$func_name(); + } + } + } + + */ +} + + +?> -------------- next part -------------- diff -ruN orig/include/utils/EditViewUtils.php htdocs/include/utils/EditViewUtils.php --- orig/include/utils/EditViewUtils.php 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/utils/EditViewUtils.php 2007-05-07 14:45:15.000000000 +0200 @@ -157,7 +157,7 @@ } $fieldvalue [] = $options; } - elseif($uitype == 17) + elseif($uitype == 17 || $uitype == 18) { $editview_label[]=$mod_strings[$fieldlabel]; $fieldvalue [] = $value; @@ -1194,6 +1194,11 @@ $fieldvalue[] = $value; } + // For inheritance + if ( in_array($uitype,array(3,4,18,31,32)) ) { + $fieldvalue[] = $col_fields[$fieldname."@##@"]; + } + // Mike Crowe Mod --------------------------------------------------------force numerics right justified. if ( !eregi("id=",$custfld) ) $custfld = preg_replace("/debug("Exiting getOutputHtml method ..."); return $final_arr; } @@ -1883,4 +1889,104 @@ } +/** This function returns the detailed list of organization units associated to +* the selected organization +* Param $organization - organization object +*/ + +function getOrgUnits($organization,$orgunitid="") +{ + // The array we're about to build + $orgunittab = array(); + $fields = "orgunitid,type,name,address,city,state,country,code,phone,fax,website"; + $fields .= ",logoname,quote_template,so_template,po_template,invoice_template"; + global $adb; + + // Parameter check + if( !isset( $organization) || $organization == '' || + !isset( $organization->id) || $organization->id == '') + return $orgunittab; + + // Database query + if( $orgunitid != "0") + $query = "SELECT vtiger_orgunit.orgunitid AS orgunitid,"; + else + $query = "SELECT 0 AS orgunitid,"; + + // logoname is only defined in the organization record. + $query .= "'@##@' AS logoname, vtiger_organizationdetails.logoname AS org_logoname"; + + foreach( split( ',', $fields) as $field) { + if( $field != "orgunitid" && $field != "logoname") { + if( $orgunitid != "0") + $query .= ",vtiger_orgunit.".$field." AS ".$field; + else + $query .= ",NULL AS ".$field; + if( $field != "type" && $field != "name") + $query .= ",vtiger_organizationdetails.".$field." AS org_".$field; + } + } + + if( $orgunitid != "0" ) { + // database joins + $query .= " FROM vtiger_orgunit + LEFT JOIN vtiger_organizationdetails + ON vtiger_orgunit.organizationname=vtiger_organizationdetails.organizationname "; + + // single or list query? + if( $orgunitid == "") + $query .= "WHERE vtiger_orgunit.organizationname='".$organization->id."' "; + else + $query .= "WHERE vtiger_orgunit.orgunitid=".$orgunitid." "; + + // do not return deleted orgunits + $query .= "AND vtiger_orgunit.deleted=0"; + } + + else { + $query .= " FROM vtiger_organizationdetails "; + $query .= " WHERE vtiger_organizationdetails.organizationname='".$organization->id."' "; + } + + // Do not return deleted organizations + $query .= " AND vtiger_organizationdetails.deleted=0"; + + $result = $adb->query( $query); + $noofrows = $adb->num_rows($result); + + // Get all rows from database + for($j = 0; $j < $noofrows; $j++) { + $orgunit = array(); + foreach( split( ',', $fields) as $field) { + if( $orgunitid != "0") { + $orgunit[$field] = $adb->query_result($result,$j,$field); + + // Inherited and extended fields + if( substr( $orgunit[$field], 0, 4) == "@##@") { + if( $field == "name") { + $orgunit[$field] = substr($orgunit[$field], 4, strlen( $orgunit[$field])-4); + if( $orgunitid != "") + $orgunit[$field] = $organization->id." ".$orgunit[$field]; + } else { + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + } + + // no orgunit selected + else { + if( $field == "name") + $orgunit[$field] = $organization->id; + elseif( $field == "orgunitid") + $orgunit[$field] = 0; + else + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + $id = $orgunit["orgunitid"]; + $orgunittab[$id] = $orgunit; + } + // Return what we've found + return $orgunittab; +} ?> -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 14:52:56.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-04 15:04:43.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Accounts/Delete.php htdocs/modules/Accounts/Delete.php --- orig/modules/Accounts/Delete.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/Delete.php 2007-05-07 17:04:15.000000000 +0200 @@ -1,37 +1,37 @@ - + -------------- next part -------------- diff -ruN orig/modules/Accounts/DetailViewAjax.php htdocs/modules/Accounts/DetailViewAjax.php --- orig/modules/Accounts/DetailViewAjax.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/DetailViewAjax.php 2007-05-07 17:09:50.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Accounts"); - $acntObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving - { - $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $acntObj->id = $crmid; - $acntObj->mode = "edit"; - $acntObj->save("Accounts"); - if($acntObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Accounts"); + $acntObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving + { + $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $acntObj->id = $crmid; + $acntObj->mode = "edit"; + $acntObj->save("Accounts"); + if($acntObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN orig/Smarty/templates/RelatedLists.tpl htdocs/Smarty/templates/RelatedLists.tpl --- orig/Smarty/templates/RelatedLists.tpl 2007-05-04 16:12:15.000000000 +0200 +++ htdocs/Smarty/templates/RelatedLists.tpl 2007-05-08 22:57:59.000000000 +0200 @@ -122,8 +122,21 @@ {$SINGLE_MOD} {$APP.LBL_INFORMATION} {/if}   - {$APP.LBL_MORE} {$APP.LBL_INFORMATION} -   + {if $MODULE eq 'Products'} + {if $RELATEDLISTS ne ''} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {else} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {/if} +   + {else} + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} +   + {/if} @@ -137,12 +150,12 @@ -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 15:43:12.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-09 00:28:57.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Emails/EmailsAjax.php htdocs/modules/Emails/EmailsAjax.php --- orig/modules/Emails/EmailsAjax.php 2007-05-04 16:12:10.000000000 +0200 +++ htdocs/modules/Emails/EmailsAjax.php 2007-05-09 00:55:09.000000000 +0200 @@ -1,54 +1,54 @@ -retrieve_entity_info($crmid,"Emails"); - $modObj->column_fields[$fieldname] = $fieldvalue; - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Emails"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -elseif($_REQUEST['ajaxmode'] == 'qcreate') -{ - require_once('quickcreate.php'); -} -else -{ - require_once('include/Ajax/CommonAjax.php'); -} -?> +retrieve_entity_info($crmid,"Emails"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Emails"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +elseif($_REQUEST['ajaxmode'] == 'qcreate') +{ + require_once('quickcreate.php'); +} +else +{ + require_once('include/Ajax/CommonAjax.php'); +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Notes/Delete.php htdocs/modules/Notes/Delete.php --- htdocs.orig/modules/Notes/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Notes/Delete.php 2007-05-09 00:57:22.000000000 +0200 @@ -1,35 +1,35 @@ - + -------------- next part -------------- diff -ruN htdocs.orig/modules/Portal/Popup.php htdocs/modules/Portal/Popup.php --- htdocs.orig/modules/Portal/Popup.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Popup.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,68 +1,68 @@ -query($query); - $portalname = $adb->query_result($result,0,'portalname'); - $portalurl = $adb->query_result($result,0,'portalurl'); -} -$portal_inputs=''; -$portal_inputs.='
-
- - {include file='RelatedListsHidden.tpl'} -
- {include file='RelatedListContents.tpl'} -
- + + {include file='RelatedListsHidden.tpl'} +
+ {include file='RelatedListContents.tpl'} +
+ {*-- End of Blocks--*}
- - - - -
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
- - - - -
- - - - - - - - - - - -
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
-
- - - - -
-    - -
-'; - -echo $portal_inputs; - - -?> +query($query); + $portalname = $adb->query_result($result,0,'portalname'); + $portalurl = $adb->query_result($result,0,'portalurl'); +} +$portal_inputs=''; +$portal_inputs.='
+ + + + + +
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
+ + + + +
+ + + + + + + + + + + +
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
+
+ + + + +
+    + +
+
'; + +echo $portal_inputs; + + +?> diff -ruN htdocs.orig/modules/Portal/Portal.php htdocs/modules/Portal/Portal.php --- htdocs.orig/modules/Portal/Portal.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Portal.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,45 +1,45 @@ -println("just entered the SavePortal method"); - $portalid=$adb->getUniqueID('vtiger_portal'); - $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -/** Function to update the portal in database - * @param $portalname : Type String - * @param $portalurl : Type String - * @param $portalid : Type Integer - * This function updates the portal with the given $portalname,$portalurl - * This Returns $portalid - */ -function UpdatePortal($portalname,$portalurl,$portalid) -{ - global $adb; - $adb->println("just entered the SavePortal method"); - $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -?> +println("just entered the SavePortal method"); + $portalid=$adb->getUniqueID('vtiger_portal'); + $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +/** Function to update the portal in database + * @param $portalname : Type String + * @param $portalurl : Type String + * @param $portalid : Type Integer + * This function updates the portal with the given $portalname,$portalurl + * This Returns $portalid + */ +function UpdatePortal($portalname,$portalurl,$portalid) +{ + global $adb; + $adb->println("just entered the SavePortal method"); + $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Settings/TaxConfig.php htdocs/modules/Settings/TaxConfig.php --- htdocs.orig/modules/Settings/TaxConfig.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Settings/TaxConfig.php 2007-05-09 01:00:29.000000000 +0200 @@ -1,244 +1,244 @@ -assign("EDIT_MODE", 'true'); -} -elseif($_REQUEST['sh_edit_tax'] == 'true') -{ - $smarty->assign("SH_EDIT_MODE", 'true'); -} - -//To add tax -if($_REQUEST['add_tax_type'] == 'true') -{ - //Add the given tax name and value as a new tax type - echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); - $getlist = true; -} -elseif($_REQUEST['sh_add_tax_type'] == 'true') -{ - echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); - $getlist = true; -} - -//To Disable ie., delete or enable -if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') -{ - if($_REQUEST['disable'] == 'true') - changeDeleted($_REQUEST['taxname'],1); - else - changeDeleted($_REQUEST['taxname'],0); - $getlist = true; -} -elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') -{ - if($_REQUEST['sh_disable'] == 'true') - changeDeleted($_REQUEST['sh_taxname'],1,'sh'); - else - changeDeleted($_REQUEST['sh_taxname'],0,'sh'); - $getlist = true; -} - -//after done save or enable/disable or added new tax the list will be retrieved again from db -if($getlist) -{ - $tax_details = getAllTaxes(); - $sh_tax_details = getAllTaxes('all','sh'); -} - -$smarty->assign("TAX_COUNT", count($tax_details)); -$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); - -if(count($tax_details) == 0) - $smarty->assign("TAX_COUNT", 0); -if(count($sh_tax_details) == 0) - $smarty->assign("SH_TAX_COUNT", 0); - -$smarty->assign("TAX_VALUES", $tax_details); - -$smarty->assign("SH_TAX_VALUES", $sh_tax_details); - -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("MOD", $mod_strings); -$smarty->display("Settings/TaxConfig.tpl"); - - -/** Function to update the list of Tax percentages for the passed tax types - * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxPercentages($new_percentages, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_percentages as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} - -/** Function to update the list of Tax Labels for the taxes - * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxLabels($new_labels, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_labels as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} -/** Function used to add the tax type which will do database alterations - * @param string $taxlabel - tax label name to be added - * @param string $taxvalue - tax value to be added - * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table - * @return void - */ -function addTaxType($taxlabel, $taxvalue, $sh='') -{ - global $adb, $log; - $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); - - //First we will check whether the tax is already available or not - if($sh != '' && $sh == 'sh') - $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; - else - $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; - $check_res = $adb->query($check_query); - - if($adb->num_rows($check_res) > 0) - return "This tax is already available"; - - //if the tax is not available then add this tax. - //Add this tax as a column in related table - if($sh != '' && $sh == 'sh') - { - $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); - $taxname = "shtax".$taxid; - $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; - } - else - { - $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); - $taxname = "tax".$taxid; - $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; - } - $res = $adb->query($query); - - //if the tax is added as a column then we should add this tax in the list of taxes - if($res) - { - if($sh != '' && $sh == 'sh') - $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - else - $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - - $res1 = $adb->query($query1); - } - - $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); - if($res1) - return ''; - else - return "There may be some problem in adding the Tax type. Please try again"; -} - -/** Function used to Enable or Disable the tax type - * @param string $taxname - taxname to enable or disble - * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable - * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo - * @return void - */ -function changeDeleted($taxname, $deleted, $sh='') -{ - global $log, $adb; - $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); - - if($sh == 'sh') - $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); - else - $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); - $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); -} - -?> +assign("EDIT_MODE", 'true'); +} +elseif($_REQUEST['sh_edit_tax'] == 'true') +{ + $smarty->assign("SH_EDIT_MODE", 'true'); +} + +//To add tax +if($_REQUEST['add_tax_type'] == 'true') +{ + //Add the given tax name and value as a new tax type + echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); + $getlist = true; +} +elseif($_REQUEST['sh_add_tax_type'] == 'true') +{ + echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); + $getlist = true; +} + +//To Disable ie., delete or enable +if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') +{ + if($_REQUEST['disable'] == 'true') + changeDeleted($_REQUEST['taxname'],1); + else + changeDeleted($_REQUEST['taxname'],0); + $getlist = true; +} +elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') +{ + if($_REQUEST['sh_disable'] == 'true') + changeDeleted($_REQUEST['sh_taxname'],1,'sh'); + else + changeDeleted($_REQUEST['sh_taxname'],0,'sh'); + $getlist = true; +} + +//after done save or enable/disable or added new tax the list will be retrieved again from db +if($getlist) +{ + $tax_details = getAllTaxes(); + $sh_tax_details = getAllTaxes('all','sh'); +} + +$smarty->assign("TAX_COUNT", count($tax_details)); +$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); + +if(count($tax_details) == 0) + $smarty->assign("TAX_COUNT", 0); +if(count($sh_tax_details) == 0) + $smarty->assign("SH_TAX_COUNT", 0); + +$smarty->assign("TAX_VALUES", $tax_details); + +$smarty->assign("SH_TAX_VALUES", $sh_tax_details); + +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("APP", $app_strings); +$smarty->assign("MOD", $mod_strings); +$smarty->display("Settings/TaxConfig.tpl"); + + +/** Function to update the list of Tax percentages for the passed tax types + * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxPercentages($new_percentages, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_percentages as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} + +/** Function to update the list of Tax Labels for the taxes + * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxLabels($new_labels, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_labels as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} +/** Function used to add the tax type which will do database alterations + * @param string $taxlabel - tax label name to be added + * @param string $taxvalue - tax value to be added + * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table + * @return void + */ +function addTaxType($taxlabel, $taxvalue, $sh='') +{ + global $adb, $log; + $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); + + //First we will check whether the tax is already available or not + if($sh != '' && $sh == 'sh') + $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; + else + $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; + $check_res = $adb->query($check_query); + + if($adb->num_rows($check_res) > 0) + return "This tax is already available"; + + //if the tax is not available then add this tax. + //Add this tax as a column in related table + if($sh != '' && $sh == 'sh') + { + $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); + $taxname = "shtax".$taxid; + $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; + } + else + { + $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); + $taxname = "tax".$taxid; + $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; + } + $res = $adb->query($query); + + //if the tax is added as a column then we should add this tax in the list of taxes + if($res) + { + if($sh != '' && $sh == 'sh') + $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + else + $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + + $res1 = $adb->query($query1); + } + + $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); + if($res1) + return ''; + else + return "There may be some problem in adding the Tax type. Please try again"; +} + +/** Function used to Enable or Disable the tax type + * @param string $taxname - taxname to enable or disble + * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable + * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo + * @return void + */ +function changeDeleted($taxname, $deleted, $sh='') +{ + global $log, $adb; + $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); + + if($sh == 'sh') + $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); + else + $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); + $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); +} + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Users/DetailViewAjax.php htdocs/modules/Users/DetailViewAjax.php --- htdocs.orig/modules/Users/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/DetailViewAjax.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,35 +1,35 @@ - "; -$local_log =& LoggerManager::getLogger('UsersAjax'); +$local_log =& LoggerManager::getLogger('UsersAjax'); $my_status = "Failure"; -$ajaxaction = $_REQUEST["ajxaction"]; -if($ajaxaction == "DETAILVIEW") -{ - $crmid = $_REQUEST["recordid"]; - $tablename = $_REQUEST["tableName"]; - $fieldname = $_REQUEST["fldName"]; - $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); +$ajaxaction = $_REQUEST["ajxaction"]; +if($ajaxaction == "DETAILVIEW") +{ + $crmid = $_REQUEST["recordid"]; + $tablename = $_REQUEST["tableName"]; + $fieldname = $_REQUEST["fldName"]; + $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); $local_log->debug("Entering DetailViewAjax crmid=".$crmid." tab=".$tablename." fld=".$fieldname." val='".$fieldvalue."'"); - if($crmid != "") - { - $userObj = new Users(); - $userObj->retrieve_entity_info($crmid,"Users"); + if($crmid != "") + { + $userObj = new Users(); + $userObj->retrieve_entity_info($crmid,"Users"); //assigned organizations if( $fieldname == 'assigned_org[]') { @@ -173,30 +173,30 @@ $adb->completeTransaction(); //Organization assignment - require('modules/Users/GetUserOrg.php'); + require('modules/Users/GetUserOrg.php'); } //anything else is a field update else { - $userObj->column_fields[$fieldname] = $fieldvalue; - $userObj->id = $crmid; - $userObj->mode = "edit"; - $userObj->save("Users"); + $userObj->column_fields[$fieldname] = $fieldvalue; + $userObj->id = $crmid; + $userObj->mode = "edit"; + $userObj->save("Users"); } //result would be success as long as the user exists - if($userObj->id != "") - { - echo ":#:SUCCESS"; + if($userObj->id != "") + { + echo ":#:SUCCESS"; $my_status = "Success"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } $local_log->debug("Exit DetailViewAjax: ".$my_status); -} -?> +} +?> diff -ruN htdocs.orig/modules/Users/EditView.php htdocs/modules/Users/EditView.php --- htdocs.orig/modules/Users/EditView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/EditView.php 2007-05-09 01:01:55.000000000 +0200 @@ -42,7 +42,7 @@ $smarty->assign("ID",$_REQUEST['record']); $mode='edit'; if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) die ("Unauthorized access to user administration."); - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); $smarty->assign("USERNAME",$focus->last_name.' '.$focus->first_name); }else { @@ -59,6 +59,11 @@ $focus->column_fields['confirm_password']=''; } +if(is_admin($current_user)) + $smarty->assign("IS_ADMIN", true); +else + $smarty->assign("IS_ADMIN", false); + global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; @@ -111,9 +116,57 @@ $smarty->assign("HOMEORDER",$focus->getHomeOrder($focus->id)); $smarty->assign("DUPLICATE",$_REQUEST['isDuplicate']); - $smarty->assign('PARENTTAB',$_REQUEST['parenttab']); +//Organization assignment +if( $mode == "create" ) { + $orgs = array(); + $smarty_orgs = array($orgs); + + //all organizations + $sql = "SELECT organizationname FROM vtiger_organizationdetails WHERE deleted=0"; + $result = $adb->query($sql); + $allorgs = array(); + while($org_result = $adb->fetch_array($result)) { + $key = $org_result["organizationname"]; + $allorgs[$key] = ''; + } + $smarty_allorgs = array($allorgs); + + //Organization untis + $orgunits = array(); + $smarty_orgunits = array($orgunits); + + //The remaining field are intentially left blank + $curorg = ""; + $assigned_org = ""; + $prim_orgunits = ""; + $org_separator = "
 "; + + //Set up session variables + $_SESSION['all_user_organizations'] = $smarty_allorgs; + $_SESSION['edit_user_organizations'] = $smarty_orgs; + $_SESSION['edit_user_orgunits'] = $smarty_orgunits; + $_SESSION['edit_user_primary_organization'] = $curorg; + $_SESSION['edit_user_assigned_organization'] = $assigned_org; + $_SESSION['edit_user_primary_orgunits'] = $prim_orgunits; +} + +//In case of edit mode use the predefined gathering fuction +else { + $crmid = $focus->id; + require('modules/Users/GetUserOrg.php'); +} + +//Assign the organization details to the html output +$smarty->assign("MULTISELECT_COMBO_BOX_ITEM_SEPARATOR_STRING", $org_separator); +$smarty->assign("ALL_USER_ORGANIZATIONS", $smarty_allorgs); +$smarty->assign("EDIT_USER_ORGANIZATIONS", $smarty_orgs); +$smarty->assign("EDIT_USER_ORGUNITS", $smarty_orgunits); +$smarty->assign("EDIT_USER_PRIMARY_ORGANIZATION", $curorg); +$smarty->assign("EDIT_USER_ASSIGNED_ORGANIZATIONS", $assigned_org); +$smarty->assign("EDIT_USER_PRIMARY_ORGUNITS", $prim_orgunits); + $smarty->display('UserEditView.tpl'); ?> diff -ruN htdocs.orig/modules/Users/ListView.php htdocs/modules/Users/ListView.php --- htdocs.orig/modules/Users/ListView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/ListView.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,82 +1,82 @@ -query($list_query); -//Retreive the Navigation array -$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); - -$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("CMOD", $mod_strings); -$smarty->assign("APP", $app_strings); -$smarty->assign("CURRENT_USERID", $current_user->id); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("CATEGORY",$category); -$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); -$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); -$smarty->assign("USER_COUNT",$no_of_users); -$smarty->assign("RECORD_COUNTS", $record_string); -$smarty->assign("NAVIGATION", $navigationOutput); -$smarty->assign("USER_IMAGES",getUserImageNames()); -if($_REQUEST['ajax'] !='') - $smarty->display("UserListViewContents.tpl"); -else - $smarty->display("UserListView.tpl"); - -?> +query($list_query); +//Retreive the Navigation array +$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); + +$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("CMOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("CURRENT_USERID", $current_user->id); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("CATEGORY",$category); +$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); +$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); +$smarty->assign("USER_COUNT",$no_of_users); +$smarty->assign("RECORD_COUNTS", $record_string); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("USER_IMAGES",getUserImageNames()); +if($_REQUEST['ajax'] !='') + $smarty->display("UserListViewContents.tpl"); +else + $smarty->display("UserListView.tpl"); + +?> diff -ruN htdocs.orig/modules/Users/Logout.php htdocs/modules/Users/Logout.php --- htdocs.orig/modules/Users/Logout.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Logout.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,109 +1,109 @@ -query($query); - $num_rows = $adb->num_rows($result); - if($num_rows > 0) - { - $ftpserver = $adb->query_result($result,0,'server'); - $ftpuser = $adb->query_result($result,0,'server_username'); - $ftppassword = $adb->query_result($result,0,'server_password'); - } - - //Taking the Backup of DB - $currenttime=date("Ymd_His"); - if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') - { $backupFileName="backup_".$currenttime.".sql"; - save_structure($backupFileName, $root_directory); - $source_file=$backupFileName; - ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); - if(file_exists($source_file)) unlink($source_file); - - } -} -// Recording Logout Info - $usip=$_SERVER['REMOTE_ADDR']; - $outtime=date("Y/m/d H:i:s"); - $loghistory=new LoginHistory(); - $loghistory->user_logout($current_user->user_name,$usip,$outtime); - - -$local_log =& LoggerManager::getLogger('Logout'); - -//Calendar Logout -//include('modules/Calendar/logout.php'); - -// clear out the autthenticating flag -session_destroy(); - -define("IN_LOGIN", true); - -// define('IN_PHPBB', true); -// include($phpbb_root_path . 'extension.inc'); -// include($phpbb_root_path . 'common.'.$phpEx); - -// -// Set page ID for session management -// -//$userdata = session_pagestart($user_ip, PAGE_LOGIN); -//init_userprefs($userdata); -// -// End session management -// - -// session id check -/* -if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) -{ - $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; -} -else -{ - $sid = ''; -} -if( $userdata['session_logged_in'] ) - { - if( $userdata['session_logged_in'] ) - { - session_end($userdata['session_id'], $userdata['user_id']); - } - - } -*/ -// go to the login screen. -header("Location: index.php?action=Login&module=Users"); -?> +query($query); + $num_rows = $adb->num_rows($result); + if($num_rows > 0) + { + $ftpserver = $adb->query_result($result,0,'server'); + $ftpuser = $adb->query_result($result,0,'server_username'); + $ftppassword = $adb->query_result($result,0,'server_password'); + } + + //Taking the Backup of DB + $currenttime=date("Ymd_His"); + if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') + { $backupFileName="backup_".$currenttime.".sql"; + save_structure($backupFileName, $root_directory); + $source_file=$backupFileName; + ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); + if(file_exists($source_file)) unlink($source_file); + + } +} +// Recording Logout Info + $usip=$_SERVER['REMOTE_ADDR']; + $outtime=date("Y/m/d H:i:s"); + $loghistory=new LoginHistory(); + $loghistory->user_logout($current_user->user_name,$usip,$outtime); + + +$local_log =& LoggerManager::getLogger('Logout'); + +//Calendar Logout +//include('modules/Calendar/logout.php'); + +// clear out the autthenticating flag +session_destroy(); + +define("IN_LOGIN", true); + +// define('IN_PHPBB', true); +// include($phpbb_root_path . 'extension.inc'); +// include($phpbb_root_path . 'common.'.$phpEx); + +// +// Set page ID for session management +// +//$userdata = session_pagestart($user_ip, PAGE_LOGIN); +//init_userprefs($userdata); +// +// End session management +// + +// session id check +/* +if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) +{ + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; +} +else +{ + $sid = ''; +} +if( $userdata['session_logged_in'] ) + { + if( $userdata['session_logged_in'] ) + { + session_end($userdata['session_id'], $userdata['user_id']); + } + + } +*/ +// go to the login screen. +header("Location: index.php?action=Login&module=Users"); +?> diff -ruN htdocs.orig/modules/Users/Save.php htdocs/modules/Users/Save.php --- htdocs.orig/modules/Users/Save.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Save.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,168 +1,168 @@ -query($query); - if($adb->num_rows($result) > 0) - { - echo 'User Name Already Exists!'; - die; - }else - { - echo 'SUCCESS'; - die; - } -} - -if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); -elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); - -$focus = new Users(); -if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') -{ - $focus->mode='edit'; - $focus->id = $_REQUEST["record"]; -} -else -{ - $focus->mode=''; -} - - -if($_REQUEST['changepassword'] == 'true') -{ - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); - $focus->id = $_REQUEST['record']; -if (isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $old_pass = $_POST['old_password']; - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -} - - -//save user Image -if(! $_REQUEST['changepassword'] == 'true') -{ - if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - - if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; - //Code contributed by mike crowe for rearrange the home page and tab - if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; - if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; - - setObjectValuesFromRequest(&$focus); - $focus->saveentity("Users"); - //$focus->imagename = $image_upload_array['imagename']; - $focus->saveHomeOrder($focus->id); - $return_id = $focus->id; - -if (isset($_POST['user_name']) && isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -if(isset($focus->id) && $focus->id != '') -{ - - if(isset($_POST['user_role'])) - { - updateUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name']) && $_POST['group_name'] != '') - { - updateUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} -else -{ - if(isset($_POST['user_role'])) - { - insertUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name'])) - { - insertUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} - -//Creating the Privileges Flat File -require_once('modules/Users/CreateUserPrivilegeFile.php'); -createUserPrivilegesfile($focus->id); -createUserSharingPrivilegesfile($focus->id); - -} -if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; -else $return_module = "Users"; -if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; -else $return_action = "DetailView"; -if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; -if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; -if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; - -$log->debug("Saved record with id of ".$return_id); - - - -if($_REQUEST['modechk'] == 'prefview') - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); -else - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); - - -?> +query($query); + if($adb->num_rows($result) > 0) + { + echo 'User Name Already Exists!'; + die; + }else + { + echo 'SUCCESS'; + die; + } +} + +if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); +elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); + +$focus = new Users(); +if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') +{ + $focus->mode='edit'; + $focus->id = $_REQUEST["record"]; +} +else +{ + $focus->mode=''; +} + + +if($_REQUEST['changepassword'] == 'true') +{ + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->id = $_REQUEST['record']; +if (isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $old_pass = $_POST['old_password']; + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +} + + +//save user Image +if(! $_REQUEST['changepassword'] == 'true') +{ + if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + + if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; + //Code contributed by mike crowe for rearrange the home page and tab + if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; + if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; + + setObjectValuesFromRequest(&$focus); + $focus->saveentity("Users"); + //$focus->imagename = $image_upload_array['imagename']; + $focus->saveHomeOrder($focus->id); + $return_id = $focus->id; + +if (isset($_POST['user_name']) && isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +if(isset($focus->id) && $focus->id != '') +{ + + if(isset($_POST['user_role'])) + { + updateUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name']) && $_POST['group_name'] != '') + { + updateUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} +else +{ + if(isset($_POST['user_role'])) + { + insertUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name'])) + { + insertUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} + +//Creating the Privileges Flat File +require_once('modules/Users/CreateUserPrivilegeFile.php'); +createUserPrivilegesfile($focus->id); +createUserSharingPrivilegesfile($focus->id); + +} +if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; +else $return_module = "Users"; +if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; +else $return_action = "DetailView"; +if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; +if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; +if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; + +$log->debug("Saved record with id of ".$return_id); + + + +if($_REQUEST['modechk'] == 'prefview') + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); +else + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); + + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Products/Delete.php htdocs/modules/Products/Delete.php --- htdocs.orig/modules/Products/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/Delete.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,40 +1,40 @@ - + diff -ruN htdocs.orig/modules/Products/DetailViewAjax.php htdocs/modules/Products/DetailViewAjax.php --- htdocs.orig/modules/Products/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/DetailViewAjax.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Products"); - $modObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'unit_price')//unit price converted to dollar value while saving - { - $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Products"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Products"); + $modObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'unit_price')//unit price converted to dollar value while saving + { + $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Products"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php --- htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 01:04:34.000000000 +0200 @@ -1,125 +1,125 @@ -$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries - */ -function getTopPurchaseOrder() -{ - require_once("data/Tracker.php"); - require_once('modules/PurchaseOrder/PurchaseOrder.php'); - require_once('include/logging.php'); - require_once('include/ListView/ListView.php'); - require_once('include/database/PearDatabase.php'); - require_once('include/ComboUtil.php'); - require_once('include/utils/utils.php'); - require_once('modules/CustomView/CustomView.php'); - - global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; - $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); - - $log = LoggerManager::getLogger('po_list'); - - $url_string = ''; - $sorder = ''; - $oCustomView = new CustomView("PurchaseOrder"); - $customviewcombo_html = $oCustomView->getCustomViewCombo(); - if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') - { - if($oCustomView->setdefaultviewid != "") - { - $viewid = $oCustomView->setdefaultviewid; - }else - { - $viewid = "0"; - } - } - $focus = new PurchaseOrder(); - - $theme_path="themes/".$theme."/"; - $image_path=$theme_path."images/"; - - //Retreive the list from Database - //<<<<<<<<>>>>>>>> - $date_var = date('Y-m-d'); - - $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; - $query = getListQuery("PurchaseOrder",$where); - $query .=" ORDER BY total DESC"; - - //<<<<<<<>>>>>>>> - - $list_result = $adb->limitQuery($query,0,5); - - //Retreiving the no of rows - $noofrows = $adb->num_rows($list_result); - - //Retreiving the start value from request - if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') - { - $start = $_REQUEST['start']; - } - else - { - - $start = 1; - } - - //Retreive the Navigation array - $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); - - if ($navigation_array['start'] == 1) - { - if($noofrows != 0) - $start_rec = $navigation_array['start']; - else - $start_rec = 0; - if($noofrows > $list_max_entries_per_page) - { - $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; - } - else - { - $end_rec = $noofrows; - } - - } - else - { - if($navigation_array['next'] > $list_max_entries_per_page) - { - $start_rec = $navigation_array['next'] - $list_max_entries_per_page; - $end_rec = $navigation_array['next'] - 1; - } - else - { - $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; - $end_rec = $noofrows; - } - } - - - //Retreive the List View Table Header - $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); - $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); - - $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); - $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); - if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) - return $values; -} -?> - +$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries + */ +function getTopPurchaseOrder() +{ + require_once("data/Tracker.php"); + require_once('modules/PurchaseOrder/PurchaseOrder.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + require_once('include/database/PearDatabase.php'); + require_once('include/ComboUtil.php'); + require_once('include/utils/utils.php'); + require_once('modules/CustomView/CustomView.php'); + + global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; + $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); + + $log = LoggerManager::getLogger('po_list'); + + $url_string = ''; + $sorder = ''; + $oCustomView = new CustomView("PurchaseOrder"); + $customviewcombo_html = $oCustomView->getCustomViewCombo(); + if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') + { + if($oCustomView->setdefaultviewid != "") + { + $viewid = $oCustomView->setdefaultviewid; + }else + { + $viewid = "0"; + } + } + $focus = new PurchaseOrder(); + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + //Retreive the list from Database + //<<<<<<<<>>>>>>>> + $date_var = date('Y-m-d'); + + $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; + $query = getListQuery("PurchaseOrder",$where); + $query .=" ORDER BY total DESC"; + + //<<<<<<<>>>>>>>> + + $list_result = $adb->limitQuery($query,0,5); + + //Retreiving the no of rows + $noofrows = $adb->num_rows($list_result); + + //Retreiving the start value from request + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + { + $start = $_REQUEST['start']; + } + else + { + + $start = 1; + } + + //Retreive the Navigation array + $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); + + if ($navigation_array['start'] == 1) + { + if($noofrows != 0) + $start_rec = $navigation_array['start']; + else + $start_rec = 0; + if($noofrows > $list_max_entries_per_page) + { + $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; + } + else + { + $end_rec = $noofrows; + } + + } + else + { + if($navigation_array['next'] > $list_max_entries_per_page) + { + $start_rec = $navigation_array['next'] - $list_max_entries_per_page; + $end_rec = $navigation_array['next'] - 1; + } + else + { + $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; + $end_rec = $noofrows; + } + } + + + //Retreive the List View Table Header + $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); + $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); + + $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); + $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); + if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) + return $values; +} +?> + -------------- next part -------------- diff -ruN htdocs.orig/modules/Potentials/language/en_us.lang.php htdocs/modules/Potentials/language/en_us.lang.php --- htdocs.orig/modules/Potentials/language/en_us.lang.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Potentials/language/en_us.lang.php 2007-05-09 01:05:32.000000000 +0200 @@ -1,153 +1,153 @@ -'Potentials', -'LBL_MODULE_TITLE'=>'Potentials: Home', -'LBL_SEARCH_FORM_TITLE'=>'Potential Search', -'LBL_LIST_FORM_TITLE'=>'Potential List', -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_OPPORTUNITY'=>'Potential:', -'LBL_NAME'=>'Potential Name', -'LBL_INVITEE'=>'Contacts', -'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_PRODUCT_NAME'=>'Product Name', -'LBL_LIST_AMOUNT'=>'Amount', -'LBL_LIST_DATE_CLOSED'=>'Expected Close', -'LBL_LIST_SALES_STAGE'=>'Sales Stage', - -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_AMOUNT'=>'Amount:', -'LBL_DATE_CLOSED'=>'Expected Close Date:', -'LBL_TYPE'=>'Type:', -'LBL_NEXT_STEP'=>'Next Step:', -'LBL_LEAD_SOURCE'=>'Lead Source:', -'LBL_SALES_STAGE'=>'Sales Stage:', -'LBL_PROBABILITY'=>'Probability (%):', -'LBL_DESCRIPTION'=>'Description:', -'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', - -'LBL_NEW_FORM_TITLE'=>'New Potential', - -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", -'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", - -'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', - -'NTC_NONE_SCHEDULED'=>'None scheduled.', - -'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', -'LBL_GENERAL_INFORMATION'=>'General Information', - - - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_NOTE'=>'New Note', -'LBL_NOTE_TITLE'=>'Notes', - -'LBL_NEW_ATTACHMENT'=>'New Attachment', -'LBL_ATTACHMENT_TITLE'=>'Attachments', - -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_WON'=>'Won', -'LBL_LOST'=>'Lost', -'LBL_VALUE_PROPOSITION'=>'Value Proposition', -'LBL_PROSPECTING'=>'Prospecting', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Potential Tools', -//Added for 4GA -'Potential Name'=>'Potential Name', -'Amount'=>'Amount', -'Account Name'=>'Account Name', -'Currency'=>'Currency', -'Expected Close Date'=>'Expected Close Date', -'Opportunity Type'=>'Opportunity Type', -'Type'=>'Type', -'Next Step'=>'Next Step', -'Lead Source'=>'Lead Source', -'Sales Stage'=>'Sales Stage', -'Assigned To'=>'Assigned To', -'Probability'=>'Probability (%)', -'Campaign Source'=>'Campaign Source', -'Description'=>'Description', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Organization unit'=>'Organization unit', -//Added for 4.2 Release -- CustomView -'Potential'=>'Potential', -'Expected Close'=>'Expected Close', - -//Added for Existing Picklist Strings - -'Prospecting'=>'Prospecting', -'Qualification'=>'Qualification', -'Needs Analysis'=>'Needs Analysis', -'Value Proposition'=>'Value Proposition', -'Id. Decision Makers'=>'Id. Decision Makers', -'Perception Analysis'=>'Perception Analysis', -'Proposal/Price Quote'=>'Proposal/Price Quote', -'Negotiation/Review'=>'Negotiation/Review', -'Closed Won'=>'Closed Won', -'Closed Lost'=>'Closed Lost', - -'Cold Call'=>'Cold Call', -'Existing Customer'=>'Existing Customer', -'Self Generated'=>'Self Generated', -'Employee'=>'Employee', -'Partner'=>'Partner', -'Public Relations'=>'Public Relations', -'Direct Mail'=>'Direct Mail', -'Conference'=>'Conference', -'Trade Show'=>'Trade Show', -'Web Site'=>'Web Site', -'Word of mouth'=>'Word of mouth', -'Other'=>'Other', - -'--None--'=>'--None--', -'Existing Business'=>'Existing Business', -'New Business'=>'New Business', - - - -); - -?> +'Potentials', +'LBL_MODULE_TITLE'=>'Potentials: Home', +'LBL_SEARCH_FORM_TITLE'=>'Potential Search', +'LBL_LIST_FORM_TITLE'=>'Potential List', +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_OPPORTUNITY'=>'Potential:', +'LBL_NAME'=>'Potential Name', +'LBL_INVITEE'=>'Contacts', +'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_PRODUCT_NAME'=>'Product Name', +'LBL_LIST_AMOUNT'=>'Amount', +'LBL_LIST_DATE_CLOSED'=>'Expected Close', +'LBL_LIST_SALES_STAGE'=>'Sales Stage', + +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_AMOUNT'=>'Amount:', +'LBL_DATE_CLOSED'=>'Expected Close Date:', +'LBL_TYPE'=>'Type:', +'LBL_NEXT_STEP'=>'Next Step:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_SALES_STAGE'=>'Sales Stage:', +'LBL_PROBABILITY'=>'Probability (%):', +'LBL_DESCRIPTION'=>'Description:', +'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +'LBL_NEW_FORM_TITLE'=>'New Potential', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", +'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", + +'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', + +'NTC_NONE_SCHEDULED'=>'None scheduled.', + +'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', +'LBL_GENERAL_INFORMATION'=>'General Information', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Note', +'LBL_NOTE_TITLE'=>'Notes', + +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_ATTACHMENT_TITLE'=>'Attachments', + +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_WON'=>'Won', +'LBL_LOST'=>'Lost', +'LBL_VALUE_PROPOSITION'=>'Value Proposition', +'LBL_PROSPECTING'=>'Prospecting', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Potential Tools', +//Added for 4GA +'Potential Name'=>'Potential Name', +'Amount'=>'Amount', +'Account Name'=>'Account Name', +'Currency'=>'Currency', +'Expected Close Date'=>'Expected Close Date', +'Opportunity Type'=>'Opportunity Type', +'Type'=>'Type', +'Next Step'=>'Next Step', +'Lead Source'=>'Lead Source', +'Sales Stage'=>'Sales Stage', +'Assigned To'=>'Assigned To', +'Probability'=>'Probability (%)', +'Campaign Source'=>'Campaign Source', +'Description'=>'Description', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Organization unit'=>'Organization unit', +//Added for 4.2 Release -- CustomView +'Potential'=>'Potential', +'Expected Close'=>'Expected Close', + +//Added for Existing Picklist Strings + +'Prospecting'=>'Prospecting', +'Qualification'=>'Qualification', +'Needs Analysis'=>'Needs Analysis', +'Value Proposition'=>'Value Proposition', +'Id. Decision Makers'=>'Id. Decision Makers', +'Perception Analysis'=>'Perception Analysis', +'Proposal/Price Quote'=>'Proposal/Price Quote', +'Negotiation/Review'=>'Negotiation/Review', +'Closed Won'=>'Closed Won', +'Closed Lost'=>'Closed Lost', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', +'Other'=>'Other', + +'--None--'=>'--None--', +'Existing Business'=>'Existing Business', +'New Business'=>'New Business', + + + +); + +?> -------------- next part -------------- diff -ruN htdocs.orig/parent_tabdata.php htdocs/parent_tabdata.php --- htdocs.orig/parent_tabdata.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/parent_tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,13 +1,21 @@ 'My Home Page',2=>'Marketing',3=>'Sales',4=>'Support',5=>'Analytics',6=>'Inventory',7=>'Tools',8=>'Settings'); -$parent_child_tab_rel_array=array(1=>array(3,9,28,),2=>array(26,6,4,28,7,9,8,),3=>array(7,6,4,2,20,22,23,14,19,8,9,),4=>array(13,15,6,4,14,8,28,9,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(30,31,),); +$parent_child_tab_rel_array=array(1=>array(3,9,10,),2=>array(26,6,4,),3=>array(7,6,4,2,20,22,23,14,19,8,),4=>array(13,15,6,4,14,8,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(),); -?> \ No newline at end of file +?> diff -ruN htdocs.orig/tabdata.php htdocs/tabdata.php --- htdocs.orig/tabdata.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,15 +1,17 @@ 3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,'Organization'=>30,'OrgUnit'=>31,); - -$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,'29'=>0,'30'=>0,'31'=>0,); - -$tab_ownedby_array=array('3'=>1,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>1,'9'=>0,'10'=>1,'13'=>0,'14'=>1,'1'=>1,'15'=>1,'16'=>0,'18'=>1,'19'=>1,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>1,'25'=>1,'26'=>0,'27'=>1,'28'=>1,'29'=>1,'30'=>0,'31'=>0,); - -$action_id_array=array('Save'=>0,'EditView'=>1,'Delete'=>2,'index'=>3,'DetailView'=>4,'Import'=>5,'Export'=>6,'Merge'=>8,'VendorEditView'=>1,'VendorDetailView'=>4,'SaveVendor'=>0,'DeleteVendor'=>2,'PriceBookEditView'=>1,'PriceBookDetailView'=>4,'SavePriceBook'=>0,'DeletePriceBook'=>2,'ConvertLead'=>9,'DetailViewAjax'=>1,'TagCloud'=>4,'QuickCreate'=>1,'Popup'=>3); +$tab_info_array=array('Home'=>3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,); -$action_name_array=array(0=>'Save',1=>'EditView',2=>'Delete',3=>'index',4=>'DetailView',5=>'Import',6=>'Export',8=>'Merge',9=>'ConvertLead'); -?> \ No newline at end of file +$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,); +?> -------------- next part -------------- diff -ruN htdocs.orig/themes/alphagrey/header.php htdocs/themes/alphagrey/header.php --- htdocs.orig/themes/alphagrey/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/alphagrey/header.php 2007-05-09 01:56:53.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/bluelagoon/header.php htdocs/themes/bluelagoon/header.php --- htdocs.orig/themes/bluelagoon/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/bluelagoon/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/woodspice/header.php htdocs/themes/woodspice/header.php --- htdocs.orig/themes/woodspice/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/woodspice/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> From weigelt at metux.de Thu May 10 11:20:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:20:49 +0200 Subject: [Vtigercrm-developers] [PATCH] __toString() fix Message-ID: <20070510152049.GB25395@nibiru.local> Hi folks, there were some __toString() methods necessary ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN cleaned/data/CRMEntity.php working/data/CRMEntity.php --- cleaned/data/CRMEntity.php 2007-05-03 17:50:00.000000000 +0200 +++ working/data/CRMEntity.php 2007-05-03 23:38:06.000000000 +0200 @@ -25,10 +25,16 @@ require_once('data/Tracker.php'); require_once('include/utils/utils.php'); require_once('include/utils/UserInfoUtil.php'); - -class CRMEntity -{ - /** + +class CRMEntity +{ + /* generic toString() method added by nekrad */ + function __toString() + { + return serialize($this); + } + + /** * This method implements a generic insert and update logic for any SugarBean * This method only works for subclasses that implement the same variable names. * This method uses the presence of an id vtiger_field that is not null to signify and update. diff -ruN cleaned/modules/Users/Users.php working/modules/Users/Users.php --- cleaned/modules/Users/Users.php 2007-05-04 02:32:05.000000000 +0200 +++ working/modules/Users/Users.php 2007-05-04 02:59:03.000000000 +0200 @@ -163,6 +163,11 @@ $this->log->debug("Exiting Users() method ..."); } + function __toString() + { + return "[[USERS]]"; + } + // Mike Crowe Mod --------------------------------------------------------Default ordering for us /** * Function to get sort order From weigelt at metux.de Thu May 10 11:21:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:21:41 +0200 Subject: [Vtigercrm-developers] [PATCH] remove noise in invoice module Message-ID: <20070510152141.GC25395@nibiru.local> Hi folks, this patch removes some noise in the invoice module ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/js/Inventory.js htdocs/include/js/Inventory.js --- orig/include/js/Inventory.js 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/js/Inventory.js 2007-05-08 21:51:32.000000000 +0200 @@ -225,8 +225,8 @@ var max_row_count = document.getElementById('proTab').rows.length; max_row_count = eval(max_row_count)-2;//As the table has two header rows, we will reduce two from table row length - if(!FindDuplicate()) - return false; +// if(!FindDuplicate()) +// return false; if(max_row_count == 0) { @@ -357,12 +357,12 @@ } } } - if(duplicate) - { - //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); - if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) - return false; - } +// if(duplicate) +// { +// //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); +// if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) +// return false; +// } return true; } From weigelt at metux.de Thu May 10 11:26:38 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:26:38 +0200 Subject: [Vtigercrm-developers] [PATCH] render API v1 Message-ID: <20070510152638.GD25395@nibiru.local> Hi folks, here're some patches to introduce my new preprint rendering API. For now there's just an latex backend, but adding more should be quite simple. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/lib/render/README htdocs/lib/render/README --- htdocs.orig/lib/render/README 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/README 2007-05-09 13:53:10.000000000 +0200 @@ -0,0 +1 @@ +This subdirectory contains the TeX rendering stuff. diff -ruN htdocs.orig/lib/render/RenderFactory.php htdocs/lib/render/RenderFactory.php --- htdocs.orig/lib/render/RenderFactory.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/RenderFactory.php 2007-05-09 17:05:57.000000000 +0200 @@ -0,0 +1,64 @@ +engine = $e; + } + + function __toString() + { + return "Unknown Engine: \"".$this->engine."\""; + } +} + +class E_Render_FormatNotSupportedByEngine extends Exception +{ + var $engine; + var $format; + + function E_Render_FormatNotSupportedByEngine($format,$engine) + { + $this->format = $format; + $this->engine = $engine; + } + + function __toString() + { + return "Format \"".$this->format. + "\" not supported by engine \"". + $this->engine. + "\""; + } +} + +class RenderFactory +{ + /* public static */ function getRenderer_Invoice($param) + { + if (!($f = $param{'format'})) + throw new Exception("missing output format"); + if (!($e = $param{'engine'})) + throw new Exception("missing engine"); + + switch ($e) + { + case 'pdflatex': + { + if ($f != 'application/pdf') + throw new E_Render_FormatNotSupportedByEngine($f,$e); + + require_once(RENDER_LIB_PREFIX.'TexRender_Invoice.php'); + return new TexRender_Invoice($param); + } + default: + throw new E_Render_UnknownEngine($e); + } + } +} diff -ruN htdocs.orig/lib/render/TexEncode.php htdocs/lib/render/TexEncode.php --- htdocs.orig/lib/render/TexEncode.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/TexEncode.php 2007-05-10 02:51:50.000000000 +0200 @@ -0,0 +1,101 @@ + + +*/ + +// NOTE: the webserver needs *write* acccess to this directory +// we normally take the session storage dir +define('TEXRENDER_TMP_MASK', '{SESSION.SAVE_PATH}/texrender-{SESSION.ID}-{NAME}'); +define('TEXRENDER_TEMPLATE_DIR', 'templates/tex/{TEMPLATE-NAME}/'); + +require_once(RENDER_LIB_PREFIX.'TexEncode.php'); + +class TexRender_Invoice +{ + /* private */ var $tmpmask; + /* private */ var $data; + /* private */ var $product_items; + /* private */ var $fn_tex; + /* private */ var $fn_pdf; + /* private */ var $fn_template; + /* private */ var $key; + + /* private */ function _tmpname($name) + { + return str_replace('{SESSION.NAME}', session_name(), + str_replace('{SESSION.ID}', session_id(), + str_replace('{SESSION.SAVE_PATH}', realpath(ini_get('session.save_path')), + str_replace('{NAME}', $name, + $this->tmpmask + )))); + } + + /* private */ function _test_write_access() + { + $fn = $this->_tmpname('write-test'); + if (!($fp=fopen($fn,"w"))) + throw new Exception("write-test: could not open file for writing: $fn"); + fputs($fp,"TEST123"); + fclose($fp); + + $res = trim(implode('',file($fn))); + if ($res != "TEST123") + throw new Exception("write-test: reading test data failed for file: $fn"); + + unlink($fn); + + return true; + } + + function TexRender_Invoice($param) + { + // test write access and otherwise failed + $this->tmpmask = TEXRENDER_TMP_MASK; + + // should be already cought by the factory, but just to be sure + if ($param{'format'} != 'application/pdf') + throw new Exception("fomat not supported by this renderer: ".$param{'format'}); + + if (!$param{'template'}) + throw new Exception("missing template name"); + + $this->template_name = $param{'template'}; + $this->data = array(); + $this->_test_write_access(); + $this->key = md5(serialize(gettimeofday)); + $this->fn_tex = $this->_tmpname($this->key.'.tex'); + $this->fn_pdf = $this->_tmpname($this->key.'.pdf'); + $this->template_dir= realpath(str_replace('{TEMPLATE-NAME}', $this->template_name,TEXRENDER_TEMPLATE_DIR)); + $this->fn_template_main = $this->template_dir.'/invoice/main.texi'; + $this->fn_template_item = $this->template_dir.'/invoice/item.texi'; + + $inc = $this->template_dir.'/config.php'; + if (!include($inc)) + throw new Exception("could not load config: $inc"); + + if (!is_array($this->config = $tex_template_config)) + throw new Exception("missing template config"); + + if (!$this->config{'lang'}) + throw new Exception("language not set in template config"); + } + + function addData($par) + { + foreach($par as $walk => $cur) + $this->data{$walk} = $cur; + } + + function checkProductItem($item) + { + if (!$item{'name'}) + throw new Exception("missing item name"); + if (!$item{'amount'}) + throw new Exception("missing amount"); + if (!is_numeric($item{'amount'})) + throw new Exception("amount must be numeric"); + if (!$item{'price'}) + throw new Exception("missing price"); + if (!is_numeric($item{'price'})) + throw new Exception("price must be numeric"); + if (($item{'discount'})&&($item{'discount'} != 0)) + throw new Exception("discount not supported yet by this renderer"); + if (!is_numeric($item{'tax_percent'})) + throw new Exception("tax_percent must be numeric"); + } + + function checkData() + { + if ((!is_array($this->_product_items)) || + (!count($this->_product_items))) + throw new Exception("no product items"); + + if (!$this->data{'ident'}) + throw new Exception("missing ident"); + } + + /* public */ function addProductItem($item) + { + // check for correct items + $this->checkProductItem($item); + + // calculate some stuff if necessary + if (!$item{'total'}) + $item{'total'} = $item{'price'} * $item{'amount'}; + if (!$item{'taxes'}) + $item{'taxes'} = $item{'total'} * $item{'tax_percent'}; + if (!$item{'topay'}) + $item{'topay'} = $item{'total'} + $item{'taxes'}; + + $this->_product_items[] = $item; + } + + /* public String */ function getOutputContentType() + { + return 'application/pdf'; + } + + /* private String */ function _generate_tex() + { + if (!($tmpl_main = implode('',file($this->fn_template_main)))) + throw new Exception("could not load main template: ".$this->fn_template_main); + if (!($tmpl_item = implode('',file($this->fn_template_item)))) + throw new Exception("could not load item template: ".$this->fn_template_item); + + // generate the item list + foreach ($this->_product_items as $walk => $cur) + { + $items .= + str_replace('::Item:Name::', $cur{'name'}, + str_replace('::Item:Price::', TexEncode::money($cur{'price'}), + str_replace('::Item:Amount::', $cur{'amount'}, + str_replace('::Item:Taxrate::', $cur{'tax_percent'}, + str_replace('::Item:Description::', $cur{'description'}, + str_replace('::Item:Comment::', trim($cur{'comment'}), + str_replace('::Item:Discount::', TexEncode::money($cur{'discount'}), + str_replace('::Item:Total::', TexEncode::money($cur{'total'}), + str_replace('::Item:Taxes::', TexEncode::money($cur{'taxes'}), + str_replace('::Item:Topay::', TexEncode::money($cur{'topay'}), + $tmpl_item)))))))))); + + $all_total += $cur{'total'}; + $all_taxes += $cur{'taxes'}; + $all_topay += $cur{'topay'}; + } + + $content = + str_replace('::TemplateDir::', $this->template_dir, + str_replace('::Items::', $items, + str_replace('::Bill:Ident::', $this->data{'ident'}, + str_replace('::Bill:Total::', TexEncode::money($all_total), + str_replace('::Bill:Taxes::', TexEncode::money($all_taxes), + str_replace('::Bill:Topay::', TexEncode::money($all_topay), + str_replace('::Company:Addr:Street::', $this->data{'company:addr:street'}, + str_replace('::Company:Addr:PCode::', $this->data{'company:addr:pcode'}, + str_replace('::Company:Addr:City::', $this->data{'company:addr:city'}, + str_replace('::Company:Addr:Country::', $this->data{'company:addr:country'}, + str_replace('::Company:Addr:State::', $this->data{'company:addr:state'}, + str_replace('::Company:Phone::', $this->data{'company:phone'}, + str_replace('::Company:Fax::', $this->data{'company:fax'}, + str_replace('::Company:Website::', $this->data{'company:website'}, + str_replace('::Customer:Name::', $this->data{'customer:name'}, + str_replace('::Customer:Addr:Street::', TexEncode::text($this->data{'billing:addr:street'}), + str_replace('::Customer:Addr:PCode::', TexEncode::text($this->data{'billing:addr:pcode'}), + str_replace('::Customer:Addr:City::', TexEncode::text($this->data{'billing:addr:city'}), + str_replace('::Customer:Addr:State::', TexEncode::text($this->data{'billing:addr:state'}), + str_replace('::Customer:Addr:Country::', TexEncode::text($this->data{'billing:addr:country'}), + $tmpl_main)))))))))))))))))))); + + return $content; + } + + /* public */ function generate() + { + $this->checkData(); + $tex = $this->_generate_tex(); + @unlink($this->fn_tex); + if (!($fp_tex = fopen($this->fn_tex,"w"))) + throw new Exception("could not open tex source file: ".$this->fn_tex); + + fputs($fp_tex,$tex); + fclose($fp_tex); + + $cmd = 'cd '.dirname($this->fn_tex).' && pdflatex '.$this->fn_tex; + `$cmd` ; `$cmd` ; // call it twice for table calculations + } + + // send appropriate http headers and output file + /* public */ function sendHTTPOutput() + { + $this->generate(); + Header("Content-Type: ".$this->getOutputContentType()); + readfile($this->fn_pdf); + } +} -------------- next part -------------- diff -ruN htdocs.orig/modules/Invoice/CreatePDF.php htdocs/modules/Invoice/CreatePDF.php --- htdocs.orig/modules/Invoice/CreatePDF.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Invoice/CreatePDF.php 2007-05-10 15:30:08.000000000 +0200 @@ -9,67 +9,36 @@ * ********************************************************************************/ - -require_once('include/fpdf/pdf.php'); -require_once('include/fpdf/pdfconfig.php'); require_once('modules/Invoice/Invoice.php'); require_once('modules/Organization/Organization.php'); require_once('include/database/PearDatabase.php'); require_once('include/utils/EditViewUtils.php'); +require_once('lib/render/RenderFactory.php'); -global $adb,$app_strings,$focus; -global $log; - -// for template checking ... -$tmpl_dirs = array( "firstpage", "pages", "lastpage"); -$tmpl_files = array( "header.php", "body.php", "footer.php"); +global $adb,$app_strings,$focus,$log; $sql="select currency_symbol from vtiger_currency_info"; $result = $adb->query($sql); $currency_symbol = $adb->query_result($result,0,'currency_symbol'); -// would you like and end page? 1 for yes 0 for no -$endpage="1"; - $id = $_REQUEST['record']; //retreiving the vtiger_invoice info $focus = new Invoice(); $focus->retrieve_entity_info($_REQUEST['record'],"Invoice"); -$account_name = getAccountName($focus->column_fields[account_id]); -$invoice_no = $focus->column_fields[invoice_no]; // **************** BEGIN POPULATE DATA ******************** - -// populate data if($focus->column_fields["salesorder_id"] != '') $so_name = getSoName($focus->column_fields["salesorder_id"]); else $so_name = ''; $po_name = $focus->column_fields["purchaseorder"]; -$valid_till = $focus->column_fields["duedate"]; -$valid_till = getDisplayDate($valid_till); -$bill_street = $focus->column_fields["bill_street"]; -$bill_city = $focus->column_fields["bill_city"]; -$bill_state = $focus->column_fields["bill_state"]; -$bill_code = $focus->column_fields["bill_code"]; -$bill_country = $focus->column_fields["bill_country"]; - -$contact_name =getContactName($focus->column_fields["contact_id"]); -$ship_street = $focus->column_fields["ship_street"]; -$ship_city = $focus->column_fields["ship_city"]; -$ship_state = $focus->column_fields["ship_state"]; -$ship_code = $focus->column_fields["ship_code"]; -$ship_country = $focus->column_fields["ship_country"]; - -$conditions = from_html($focus->column_fields["terms_conditions"]); -$description = from_html($focus->column_fields["description"]); -$status = $focus->column_fields["invoicestatus"]; - // Company information -$crmid = $focus->column_fields["record_id"]; +if (!($crmid = $focus->column_fields["record_id"])) + throw new Exception("crmid is null/empty"); + $org_query = "select organizationname from vtiger_entity2org where crmid='".$crmid."'"; $result = $adb->query($org_query); $org_rows = $adb->num_rows($result); @@ -82,7 +51,7 @@ $org_name = $adb->query_result($result,0,"organizationname"); } else { $log->info( $module. " '".$crmid."' not assigned to any organization"); - exit(); + throw new Exception("crmid $crmid not assigned to any organisation (org_name=$org_name)"); } // get organization/orgunit details @@ -92,68 +61,11 @@ $log->debug( "Here we are: getOrgUnits( $organization, $orgunitid);"); $orgunittab = getOrgUnits( $organization, $orgunitid); -if( is_array( $orgunittab[$orgunitid])) { - $orgdetails = $orgunittab[$orgunitid]; - $org_name = $orgdetails["name"]; - $org_address = $orgdetails["address"]; - $org_city = $orgdetails["city"]; - $org_state = $orgdetails["state"]; - $org_country = $orgdetails["country"]; - $org_code = $orgdetails["code"]; - $org_phone = $orgdetails["phone"]; - $org_fax = $orgdetails["fax"]; - $org_website = $orgdetails["website"]; - $logo_name = $orgdetails["logoname"]; - $template = $orgdetails["invoice_template"]; -} else { - $log->info( $module. " '".$crmid."' organization/orgunitid mismatch"); - exit(); -} - -// Check the template -if( $template == "") - $template = "Default"; - -if( $template != "Default") { - foreach( $tmpl_dirs as $dir) { - foreach( $tmpl_files as $file) { - if( !file_exists( "modules/".$module."/pdf_templates/".$template."/".$dir."/".$file)) { - $log->info( $module. " '".$crmid."' organization/orgunitid template '".$template."' is incomplete"); - $log->info("Missing file: modules/".$module."/pdf_templates/".$template."/".$dir."/".$file); - $log->info("Fallback to the Default template"); - $template = "Default"; - break 2; - } - } - } -} -//NOTE : Removed currency symbols and added with Grand Total text. it is enough to show the currency symbol in one place - -//we can also get the NetTotal, Final Discount Amount/Percent, Adjustment and GrandTotal from the array $associated_products[1]['final_details'] - -//getting the Net Total -$price_subtotal = number_format($focus->column_fields["hdnSubTotal"],2,'.',','); - -//Final discount amount/percentage -$discount_amount = $focus->column_fields["hdnDiscountAmount"]; -$discount_percent = $focus->column_fields["hdnDiscountPercent"]; - -if($discount_amount != "") - $price_discount = number_format($discount_amount,2,'.',','); -else if($discount_percent != "") -{ - //This will be displayed near Discount label - used in include/fpdf/templates/body.php - $final_price_discount_percent = "(".number_format($discount_percent,2,'.',',')." %)"; - $price_discount = number_format((($discount_percent*$focus->column_fields["hdnSubTotal"])/100),2,'.',','); -} -else - $price_discount = "0.00"; - -//Adjustment -$price_adjustment = number_format($focus->column_fields["txtAdjustment"],2,'.',','); -//Grand Total -$price_total = number_format($focus->column_fields["hdnGrandTotal"],2,'.',','); +if(!is_array( $orgunittab[$orgunitid])) + throw new Exception("org/orgunitid mismatch"); +$orgdetails = $orgunittab[$orgunitid]; +$template = $orgdetails["invoice_template"]; //get the Associated Products for this Invoice $focus->id = $focus->column_fields["record_id"]; @@ -166,6 +78,8 @@ //To calculate the group tax amount if($final_details['taxtype'] == 'group') { + throw new Exception("group tax not supported"); + $group_tax_total = $final_details['tax_totalamount']; $price_salestax = number_format($group_tax_total,2,'.',','); @@ -191,47 +105,37 @@ $sh_tax_amount = $final_details['shtax_totalamount']; $price_shipping_tax = number_format($sh_tax_amount,2,'.',','); +$render = RenderFactory::getRenderer_Invoice(array +( + format => 'application/pdf', + engine => 'pdflatex', + template => 'default' +)); //This is to get all prodcut details as row basis -for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++) +for($i=1;$i<=$num_products;$i++) { - $product_name[$i] = $associated_products[$i]['productName'.$i]; - $prod_description[$i] = $associated_products[$i]['productDescription'.$i]; - $product_id[$i] = $associated_products[$i]['hdnProductId'.$i]; - $qty[$i] = $associated_products[$i]['qty'.$i]; - $unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',','); - $list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',','); - $list_pricet[$i] = $associated_products[$i]['listPrice'.$i]; - $discount_total[$i] = $associated_products[$i]['discountTotal'.$i]; - //aded for 5.0.3 pdf changes - $product_code[$i] = $associated_products[$i]['hdnProductcode'.$i]; - - $taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i]; - - $producttotal = $taxable_total; - $total_taxes = '0.00'; if($focus->column_fields["hdnTaxType"] == "individual") { - $total_tax_percent = '0.00'; - //This loop is to get all tax percentage and then calculate the total of all taxes - for($tax_count=0;$tax_countaddProductItem(array + ( + code => $associated_products[$i]['hdnProductcode'.$i], + name => $associated_products[$i]['productName'.$i], + amount => $associated_products[$i]['qty'.$i], + price => $associated_products[$i]['listPrice'.$i], + unit_price => $associated_products[$i]['unitPrice'.$i], + discount => $associated_products[$i]['discountTotal'.$i], + tax_percent => (integer)($tax_percent)/100, + description => $associated_products[$i]['productDescription'.$i], + comment => $associated_products[$i]['comment'.$i] + )); // Product piecelists $query = "SELECT vtiger_crmentity.crmid, @@ -245,86 +149,46 @@ INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid WHERE vtiger_crmentity.deleted = 0 - AND vtiger_products2products_rel.productid = ".$product_id[$i]." + AND vtiger_products2products_rel.productid = ".$product_id." AND vtiger_products2products_rel.relation_type = 10"; $result = $adb->query($query); $pieces = $adb->num_rows($result); if( $pieces > 0) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = "consisting of:"; - $product_line[$j]["Qty"] = ""; - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - for( $pl=0; $pl<$pieces; $pl++) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = - $adb->query_result( $result, $pl, "productname"); - $product_line[$j]["Qty"] = - $adb->query_result( $result, $pl, "quantity"); - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - } + throw new Exception("multiple pieces not yet supported !"); } } -//echo '
Product Details ==>';print_r($product_line);echo '
'; -//echo '
';print_r($associated_products);echo '
'; - // ************************ END POPULATE DATA ***************************8 -$page_num='1'; -$pdf = new PDF( 'P', 'mm', 'A4' ); -$pdf->Open(); - -$num_pages=ceil(count($product_line)/$products_per_page); - - -$current_product=0; -for($l=0;$l<$num_pages;$l++) -{ - $line=array(); - if($num_pages == $page_num) - $lastpage=1; - - while($current_product != $page_num*$products_per_page) - { - $line[]=$product_line[$current_product]; - $current_product++; - } - - //if bottom > 145 then we skip the Description and T&C in every - //page and display only in lastpage - //if you want to display the description and T&C in each page then - //set the display_desc_tc='true' and bottom <= 145 in pdfconfig.php - $pdf->AddPage(); - if( $page_num == "1") { - include("pdf_templates/".$template."/firstpage/header.php"); - include("pdf_templates/".$template."/firstpage/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/firstpage/footer.php"); - } else { - include("pdf_templates/".$template."/pages/header.php"); - include("pdf_templates/".$template."/pages/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/pages/footer.php"); - } - - $page_num++; - - if (($endpage) && ($lastpage)) - { - $pdf->AddPage(); - include("pdf_templates/".$template."/lastpage/header.php"); - include("pdf_templates/".$template."/lastpage/body.php"); - include("pdf_templates/".$template."/lastpage/footer.php"); - } -} - - -$pdf->Output('Invoice-'.$crmid.'.pdf','D'); //added file name to make it work in IE, also forces the download giving the user the option to save +$render->addData(array +( + 'valid_until' => $focus->column_fields["duedate"], + 'description' => from_html($focus->column_fields["description"]), + 'conditions' => from_html($focus->column_fields["terms_conditions"]), + 'tax_type' => $focus->column_fields['hdnTaxType'], + 'ident' => $focus->column_fields['invoice_no'], + 'contact:name' => getContactName($focus->column_fields["contact_id"]), + 'company:name' => $orgdetails["name"], + 'company:addr:city' => $orgdetails["city"], + 'company:addr:pcode' => $orgdetails["code"], + 'company:addr:street' => $orgdetails["address"], + 'company:addr:country' => $orgdetails["country"], + 'company:addr:state' => $orgdetails["state"], + 'company:phone' => $orgdetails["phone"], + 'company:fax' => $orgdetails["fax"], + 'company:website' => $orgdetails["website"], + 'customer:name' => getAccountName($focus->column_fields[account_id]), + 'shipping:addr:city' => $focus->column_fields["ship_city"], + 'shipping:addr:pcode' => $focus->column_fields["ship_code"], + 'shipping:addr:street' => $focus->column_fields["ship_street"], + 'shipping:addr:country' => $ship_country = $focus->column_fields["ship_country"], + 'shipping:addr:state' => $focus->column_fields["ship_state"], + 'billing:addr:city' => $focus->column_fields["bill_city"], + 'billing:addr:pcode' => $focus->column_fields["bill_code"], + 'billing:addr:street' => $focus->column_fields["bill_street"], + 'billing:addr:country' => $focus->column_fields["bill_country"], + 'billing:addr:state' => $focus->column_fields["bill_state"] +)); -// Added to fix annoying bug that includes HTML in your PDF +$render->sendHTTPOutput(); exit(); -?> -------------- next part -------------- diff -ruN htdocs.orig/templates/tex/default/config.php htdocs/templates/tex/default/config.php --- htdocs.orig/templates/tex/default/config.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/config.php 2007-05-09 20:00:54.000000000 +0200 @@ -0,0 +1,7 @@ + 'de', + 'tex2pdf' => 'pdflatex' +); diff -ruN htdocs.orig/templates/tex/default/invoice/item.texi htdocs/templates/tex/default/invoice/item.texi --- htdocs.orig/templates/tex/default/invoice/item.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/item.texi 2007-05-10 14:25:30.000000000 +0200 @@ -0,0 +1,2 @@ +::Item:Name:: \ifempty{::Item:Comment::}{}{(::Item:Comment::)} & ::Item:Price:: \Euro & ::Item:Amount:: & ::Item:Total:: \Euro \\ +\hline diff -ruN htdocs.orig/templates/tex/default/invoice/main.texi htdocs/templates/tex/default/invoice/main.texi --- htdocs.orig/templates/tex/default/invoice/main.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/main.texi 2007-05-10 14:15:53.000000000 +0200 @@ -0,0 +1,53 @@ +\def\ResourcePrefix{::TemplateDir::/resource} +\input \ResourcePrefix/bill.tex + +\def\ifempty#1#2#3{\def\inner{#1}\ifx\inner\empty + #2\else #3\fi } + +\begin{document} + \letterInit + \begin{letter}{% + ::Customer:Addr:Street:: \ \\ + ::Customer:Addr:PCode::\ ::Customer:Addr:City:: \ \\ + \ \\[\medskipamount] + } + + \opening{\Large Ihre Rechnung:\normalsize~~~ ::Bill:Ident:: +%% ~~~~~~~~~~vom:~~::BillDate:: + } + + \setlength\LTleft{0pt} + \setlength\LTright{72pt} + \begin{longtable}{|p{300pt}|r|r|r|} + \hline + Leistung & Preis & Menge & Summe \\ + \hline + \endhead + \hline + \hline + \multicolumn{3}{|l|}{Rechnungsbetrag} & ::Bill:Total:: \Euro \\ + \hline + \multicolumn{3}{|l|}{Umsatzsteuer} & ::Bill:Taxes:: \Euro \\ + \hline + \hline + \multicolumn{3}{|l|}{Gesamt} & ::Bill:Topay:: \Euro \\ + \hline + \noalign{ + \vspace{12pt} + \small + Soweit nicht anders angegeben entspricht das Lieferdatum + dem Rechnungsdatum + } + \noalign{ + \vspace{12pt} + \normalsize + Bitte {\"u}berweisen Sie den f{\"a}lligen Betrag binnen + 10~Tagen auf eines unserer Konten. \newline + Die Ware bleibt bis zur vollst{\"a}ndigen Bezahlung Eigentum + von metux IT service. + } + \endlastfoot + ::Items:: + \end{longtable} + \end{letter} +\end{document} diff -ruN htdocs.orig/templates/tex/default/resource/bill.tex htdocs/templates/tex/default/resource/bill.tex --- htdocs.orig/templates/tex/default/resource/bill.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/bill.tex 2007-05-09 23:55:35.000000000 +0200 @@ -0,0 +1,22 @@ +\input{\ResourcePrefix/metux.tex} + +\documentclass[a4paper,bottom=0cm,fromalign=center,fromlogo=true]{scrlttr2} +\usepackage{epsfig} +\usepackage{longtable} + +\usepackage{ngerman} +\usepackage[latin1]{inputenc} +%usepackage{fancyhdr} +%pagestyle{fancy} + +% brief-init +\newcommand\letterInit{% + \captionsgerman + \dategerman + \firsthead{\metuxHeader} + \firstfoot{\metuxFooter} + \setkomavar{fromname}{metux IT service} + \setkomavar{fromaddress}{Heydaer Stra{\ss}e 23, 99338 Plaue} +} + +\newcommand\Euro{Euro} diff -ruN htdocs.orig/templates/tex/default/resource/header.eps htdocs/templates/tex/default/resource/header.eps --- htdocs.orig/templates/tex/default/resource/header.eps 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.eps 2002-09-17 01:45:21.000000000 +0200 @@ -0,0 +1,178 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: header.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3d +%%CreationDate: Tue Jul 30 18:35:09 2002 +%%For: ems at nibiru.metux.de () +%%BoundingBox: 0 0 643 88 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 88 moveto 0 0 lineto 643 0 lineto 643 88 lineto closepath clip newpath +-4.5 96.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/reencdict 12 dict def /ReEncode { reencdict begin +/newcodesandnames exch def /newfontname exch def /basefontname exch def +/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def +basefontdict { exch dup /FID ne { dup /Encoding eq +{ exch dup length array copy newfont 3 1 roll put } +{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall +newfont /FontName newfontname put newcodesandnames aload pop +128 1 255 { newfont /Encoding get exch /.notdef put } for +newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat +newfontname newfont definefont pop end } def +/isovec [ +8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde +8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis +8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron +8#220 /dotlessi 8#230 /oe 8#231 /OE +8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling +8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis +8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot +8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus +8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph +8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine +8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf +8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute +8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring +8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute +8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute +8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve +8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply +8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex +8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave +8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring +8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute +8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute +8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve +8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide +8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex +8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def +/Courier-Bold /Courier-Bold-iso isovec ReEncode +/Times-Bold /Times-Bold-iso isovec ReEncode +/Times-Roman /Times-Roman-iso isovec ReEncode +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +/Times-Roman-iso ff 150.00 scf sf +6600 1200 m +gs 1 -1 sc (www.metux.de) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 825 m +gs 1 -1 sc (+49 36207 51833) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 675 m +gs 1 -1 sc (+49 174 7066481) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 1350 m +gs 1 -1 sc (contact @ metux.de) col8 sh gr +/Courier-Bold-iso ff 180.00 scf sf +1650 750 m +gs 1 -1 sc (Ihr innovativer IT-Dienstleister) col25 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 1200 m +gs 1 -1 sc ( Internet) col0 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 675 m +gs 1 -1 sc ( Telephon) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1350 m +gs 1 -1 sc (Advance Bank \(BLZ 702 300 00\), Kto-Nr: 200 72 64 206) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1575 m +gs 1 -1 sc (Enrico Weigelt, Steuer-Nr: 154/286/05931) col8 sh gr +/Times-Bold-iso ff 300.00 scf sf +75 750 m +gs 1 -1 sc (metux ITS) col9 sh gr +/Courier-Bold-iso ff 150.00 scf sf +150 1350 m +gs 1 -1 sc (Bankverbindung:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +750 1575 m +gs 1 -1 sc (Inhaber:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +225 1125 m +gs 1 -1 sc (Hausanschrift:) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1125 m +gs 1 -1 sc (Heydaer Strasse 23 99338 Plaue) col8 sh gr +/Times-Roman-iso ff 180.00 scf sf +10125 300 m +gs 1 -1 sc (tricktext) col0 sh gr +$F2psEnd +rs diff -ruN htdocs.orig/templates/tex/default/resource/header.fig htdocs/templates/tex/default/resource/header.fig --- htdocs.orig/templates/tex/default/resource/header.fig 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.fig 2002-09-17 01:44:26.000000000 +0200 @@ -0,0 +1,24 @@ +#FIG 3.2 +Landscape +Center +Inches +A4 +100.00 +Single +-2 +1200 2 +4 0 0 893 -1 14 10 -0.0000 4 135 1350 150 1350 Bankverbindung:\001 +4 0 0 890 -1 14 10 -0.0000 4 105 1260 225 1125 Hausanschrift:\001 +4 0 9 918 -1 2 20 0.0000 4 150 1005 75 750 metux ITS\001 +4 0 25 969 -1 14 12 -0.0000 4 135 3360 1650 750 Ihr innovativer IT-Dienstleister\001 +4 0 0 942 -1 2 10 0.0000 4 135 750 5700 675 Telephon\001 +4 0 8 991 -1 0 10 0.0000 4 105 1050 6600 675 +49 174 7066481\001 +4 0 8 997 -1 0 10 0.0000 4 105 1050 6600 825 +49 36207 51833\001 +4 0 8 999 -1 0 10 0.0000 4 105 990 6600 1200 www.metux.de\001 +4 0 0 946 -1 2 10 0.0000 4 105 765 5700 1200 Internet\001 +4 0 8 888 -1 0 10 0.0000 4 135 1935 1650 1125 Heydaer Strasse 23 99338 Plaue\001 +4 0 8 987 -1 0 10 0.0000 4 135 1230 6600 1350 contact @ metux.de\001 +4 0 8 933 -1 0 10 0.0000 4 135 3435 1650 1350 Advance Bank (BLZ 702 300 00), Kto-Nr: 200 72 64 206\001 +4 0 0 50 0 0 12 0.0000 4 135 645 10125 300 tricktext\001 +4 0 0 893 -1 14 10 0.0000 4 105 720 750 1575 Inhaber:\001 +4 0 8 933 -1 0 10 0.0000 4 135 2415 1650 1575 Enrico Weigelt, Steuer-Nr: 154/286/05931\001 diff -ruN htdocs.orig/templates/tex/default/resource/metux.tex htdocs/templates/tex/default/resource/metux.tex --- htdocs.orig/templates/tex/default/resource/metux.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/metux.tex 2007-05-09 23:56:59.000000000 +0200 @@ -0,0 +1,76 @@ +% Variablen .... % +\def\metuxSignature{\epsfig{file=\ResourcePrefix/signature.png}} +\def\metuxName{metux IT service} +\def\metuxPhone{+49-36207-519931} +\def\metuxFax{+49-36207-519932} +\def\metuxEmail{weigelt at metux.de} +\def\metuxUrl{www.metux.de} +\def\metuxAddress{Heydaer Stra{\ss}e 23, 99338 Plaue} +\def\metuxBankAccount{0972596900} +\def\metuxBankCompany{Dresdner Bank AG} +\def\metuxBankCode{82080000} +\def\metuxBank{Kto: \metuxBankAccount, BLZ: \metuxBankCode, \metuxBankCompany} +\def\metuxStrnr{154/286/05931} +\def\metuxOwner{Enrico Weigelt} + +\def\nl{\ \\} +\def\metuxGeomLeft{2cm} +\def\metuxGeomRight{2cm} +\def\metuxGeomBottom{1cm} +\def\metuxGeomHead{1cm} +\def\metuxGeomTop{0.5cm} + +\newcommand\metuxFooter +{ + \hrule + ~\newline + \parbox[l]{180pt}{ + \small + \metuxName \\ + Inh. \metuxOwner \\ + \metuxAddress \\ + StNr: \metuxStrnr + } + \parbox[l]{180pt}{ + \small + Bankverbindung: \\ + Kto: \metuxBankAccount \\ + BLZ: \metuxBankCode \\ + \metuxBankCompany + } + \parbox[l]{180pt}{ + \small + Tel: \metuxPhone \\ + Fax: \metuxFax \\ + eMail: \metuxEmail \\ + WWW: \metuxUrl + } +} + +\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.png}} +%\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.eps}} +\newcommand\metuxInit{ + \renewcommand{\headrulewidth}{0.5pt} + \renewcommand{\footrulewidth}{0.5pt} + \cfoot{\metuxFooter} + \chead{\metuxHeader} +} + +% \newcommand\Euro{Euro} + +\def\metuxMFG{% + \noindent Mit freundlichem Gru\ss + + \epsfig{\metuxSignature} + + \noindent Enrico Weigelt \\ + metux IT service +} + +\def\metuxMFGpriv{% + \noindent Mit freundlichem Gru\ss + + \metuxSignature + + \noindent Enrico Weigelt +} From amvandemore at gmail.com Thu May 10 15:59:44 2007 From: amvandemore at gmail.com (Adam Vande More) Date: Thu, 10 May 2007 14:59:44 -0500 Subject: [Vtigercrm-developers] Custom Integration with website Message-ID: <6201873e0705101259w1eb599d0xd5fcbb0916cb546c@mail.gmail.com> I have written our contact us page to insert the customer's information directly into vtiger as a lead. I am aware that the webforms add on does the same thing but I elected to write my own script. The script inserts data into tables: vtiger_crmentity vtiger_leaddetails vtiger_leadaddress vtiger_leadscf vtiger_leadsubdetails vtiger_crmentity_seq - increments the value In testing this appears to work just fine, however it occurs to me that I may have missed some possible constraints in the db that could result in data integrity issues if i didn't do this correctly. Are there any other tables that should be updated or any other areas I should be worried about? Also the webforms source seems exceedingly complex for a relatively simple task and it's too abstracted for me to be able to read easily. I'm not sure if it's doing checks that I should implement too. Does anyone have any insight into this? -- Adam Vande More Systems Administrator Mobility Sales -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/6318a0f8/attachment-0002.html From weigelt at metux.de Thu May 10 20:13:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 02:13:35 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() Message-ID: <20070511001335.GA5640@nibiru.local> Hi folks, as we sometimes get some errors like: # Fatal error: Call to a member function Move() on a non-object # in .../include/database/PearDatabase.php on line 443 Obviously sometimes the query_result() method is called with an non-existing result object. This patch adds an check which throws an exception on missing result object, so we can easily track it down. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 @@ -438,6 +438,8 @@ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); + if (!is_object($result)) + throw new Exception("result is not an object"); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); From jorge.torres.maldonado at gmail.com Thu May 10 20:31:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Thu, 10 May 2007 20:31:24 -0400 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <530c7d700705101731q8704acw53e1e2f0e7bfc03f@mail.gmail.com> THis one I like, thank you very much On 5/10/07, Enrico Weigelt wrote: > > > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/152bcf4f/attachment.html From weigelt at metux.de Thu May 10 21:13:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:13:10 +0200 Subject: [Vtigercrm-developers] [PATCH] some new $adb (PearDatabase) methods Message-ID: <20070511011310.GA19509@nibiru.local> Hi folks, this patch adds two new functions to the PearDatabase ($adb) class: * sql_concat(array): generates an sql expression for field concatenations, based on selected RDBMS. * run_query_field(string): executes an given SQL query and returns only the first field of the first record. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-11 02:17:06.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 02:55:29.000000000 +0200 @@ -434,6 +434,31 @@ return $this->change_key_case($result->FetchRow()); } + function sql_concat($list) + { + switch ($this->dbType) + { + case 'mysql': + return 'concat('.implode(',',$list).')'; + case 'pgsql': + return '('.implode('||',$list).')'; + default: + throw new Exception("unsupported dbtype \"".$this->dbType."\""); + } + } + + function run_query_field($sql) + { + $this->checkConnection(); + $result = $this->database->Execute($sql); + + if (!is_object($result)) + throw new Exception("query failed: $sql"); + + $row = $result->FetchRow(); + return array_shift($row); + } + /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { From weigelt at metux.de Thu May 10 21:32:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:32:07 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) Message-ID: <20070511013207.GB19509@nibiru.local> Hi folks, the leads module (Tracker.php) suffers from an sql bug: it uses mysql specific sql statements for concatenating fields. This ends up in empty result objects and so the already mentioned error of trying to call Move() on non-object. This patch solves this by using the new PearDatabas::sql_concat() function (see prev. patch) for creating the statement. Also this patch calls the new PearDatabase::run_query_field() for the one-field-query. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 @@ -80,18 +80,23 @@ $entityidfield = $adb->query_result($result,0,'entityidfield'); if(!(strpos($fieldsname,',') === false)) { - $fieldlists = explode(',',$fieldsname); - $fieldsname = "concat("; - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); - $fieldsname = $fieldsname.")"; + // concatenate multiple fields with an whitespace between them + $fieldlists = explode(',',$fieldsname); + $fl = array(); + foreach($fieldlists as $w => $c) + { + if (count($fl)) + $fl[] = "' '"; + $fl[] = $c; + } + $fieldsname = $adb->sql_concat($fl); } if($current_module =='Organization') { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; } else { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; } - $result = $adb->query($query1); - $item_summary = $adb->query_result($result,0,'entityname'); + $item_summary = $adb->run_query_field($query1); } ### Check database item sizes From jens at Strawberry.COM Fri May 11 03:36:01 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 09:36:01 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) In-Reply-To: <20070511013207.GB19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 03:32:07AM +0200 References: <20070511013207.GB19509@nibiru.local> Message-ID: <20070511093601.A14681@Strawberry.COM> Hi, my Postgres patches already introduced a stored procedure which handles concats in Postgres. This is IMHO mor performant. Jens On Fri, May 11, 2007 at 03:32:07AM +0200, Enrico Weigelt wrote: > > Hi folks, > > > the leads module (Tracker.php) suffers from an sql bug: it uses > mysql specific sql statements for concatenating fields. This ends > up in empty result objects and so the already mentioned error > of trying to call Move() on non-object. > > This patch solves this by using the new PearDatabas::sql_concat() > function (see prev. patch) for creating the statement. > > Also this patch calls the new PearDatabase::run_query_field() > for the one-field-query. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php > --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 > @@ -80,18 +80,23 @@ > $entityidfield = $adb->query_result($result,0,'entityidfield'); > if(!(strpos($fieldsname,',') === false)) > { > - $fieldlists = explode(',',$fieldsname); > - $fieldsname = "concat("; > - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); > - $fieldsname = $fieldsname.")"; > + // concatenate multiple fields with an whitespace between them > + $fieldlists = explode(',',$fieldsname); > + $fl = array(); > + foreach($fieldlists as $w => $c) > + { > + if (count($fl)) > + $fl[] = "' '"; > + $fl[] = $c; > + } > + $fieldsname = $adb->sql_concat($fl); > } > if($current_module =='Organization') { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; > } else { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; > } > - $result = $adb->query($query1); > - $item_summary = $adb->query_result($result,0,'entityname'); > + $item_summary = $adb->run_query_field($query1); > } > > ### Check database item sizes > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From philip at vtiger.com Fri May 11 06:29:36 2007 From: philip at vtiger.com (Philip) Date: Fri, 11 May 2007 15:59:36 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <46444590.1040501@vtiger.com> Hi Enrico, When tested the code i had the following exception thrown in the screen. *Fatal error*: Uncaught exception 'Exception' with message 'given result set is not an object' in /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 Stack trace: #0 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): PearDatabase->query_result(false, 0, 'count') #1 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): include('/home/crm-test3...') #2 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): require_once('/home/crm-test3...') #3 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): require_once('/home/crm-test3...') #4 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): include('/home/crm-test3...') #5 {main} thrown in */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* on line *442 *So where should i catch this exception. Regards, Philip Enrico Weigelt wrote: > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > > ------------------------------------------------------------------------ > > diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php > --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 > @@ -438,6 +438,8 @@ > function query_result(&$result, $row, $col=0) > { > //$this->println("ADODB query_result r=".$row." c=".$col); > + if (!is_object($result)) > + throw new Exception("result is not an object"); > $result->Move($row); > $rowdata = $this->change_key_case($result->FetchRow()); > //$this->println($rowdata); > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Fri May 11 09:57:17 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 15:57:17 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <46444590.1040501@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> Message-ID: <20070511135717.GD19509@nibiru.local> * Philip schrieb: Hi, > When tested the code i had the following exception thrown in the screen. > > *Fatal error*: Uncaught exception 'Exception' with message 'given result > set is not an object' in > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 > Stack trace: #0 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): > PearDatabase->query_result(false, 0, 'count') #1 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): > include('/home/crm-test3...') #2 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): > require_once('/home/crm-test3...') #3 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): > require_once('/home/crm-test3...') #4 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): > include('/home/crm-test3...') #5 {main} thrown in > */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* > on line *442 Looks like an bug in Potentials/ListView.php. Probably an query failed and so $result is empty. We've lots of such issues everywhere :( cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:38:26 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:38:26 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers Message-ID: <20070511143826.GF19509@nibiru.local> Hi folks, is it possible (by the db schema) to change invoice numbers ? I don't like the automatic numbering very much and like to change the numbers. I suspect similar trouble as w/ the org/company name ;-O cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:46:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:46:44 +0200 Subject: [Vtigercrm-developers] Sending invoice via email Message-ID: <20070511144644.GG19509@nibiru.local> Hi folks, I'm looking for an function to send invoices automatically via eMail. Is there already such an function or should I implement it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:57:14 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:57:14 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" Message-ID: <20070511145714.GH19509@nibiru.local> Hi folks, could anyone please explain what the invoice status "credited invoice" actually means ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Fri May 11 11:03:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:03:35 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511143826.GF19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:38:26PM +0200 References: <20070511143826.GF19509@nibiru.local> Message-ID: <20070511170335.A16456@Strawberry.COM> Hi, originally the invoice number was just the CRMEntity ID. As it is for any other entity like quotes, so, ... But: hasn't there been a recent change on that (just invoices)? What about a generic solution to that issue, too? I was already thinking about introducing "ranges of numbers", a table that defines the format of particular numbers, like invoice-numbers, product-numbers etc. Especially for invoices we need some automatism. Some govern- ments - Germany !!! - forces companies to provide an determi- nistic numbering scheme for invoices. So this field cannot be assigned manually to each invoice. jens On Fri, May 11, 2007 at 04:38:26PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > is it possible (by the db schema) to change invoice numbers ? > > I don't like the automatic numbering very much and like to change > the numbers. > > I suspect similar trouble as w/ the org/company name ;-O > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Fri May 11 11:07:02 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:07:02 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511145714.GH19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:57:14PM +0200 References: <20070511145714.GH19509@nibiru.local> Message-ID: <20070511170702.C16456@Strawberry.COM> Eine Stundung? On Fri, May 11, 2007 at 04:57:14PM +0200, Enrico Weigelt wrote: > > Hi folks, > > could anyone please explain what the invoice status > "credited invoice" actually means ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Fri May 11 11:22:25 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:22:25 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511170335.A16456@Strawberry.COM> References: <20070511143826.GF19509@nibiru.local> <20070511170335.A16456@Strawberry.COM> Message-ID: <20070511152225.GI19509@nibiru.local> * Jens Hamisch schrieb: Hi, > originally the invoice number was just the CRMEntity ID. > As it is for any other entity like quotes, so, ... > But: hasn't there been a recent change on that (just invoices)? Ah, I see: The invoice ID is actually an pointer for schema internal references. And that's the source of the problem: internal references should always base on internal object IDs, never on user- visible idents/names. > What about a generic solution to that issue, too? > I was already thinking about introducing "ranges of numbers", > a table that defines the format of particular numbers, like > invoice-numbers, product-numbers etc. Ugh, no. Not for the object references. For such things we have sequences, which produce OIDs (which are in fact just unique numbers). Many things which an user would call "number" are names, not numbers. So ie. for invoice numbers: they're not object ID's, but names. Of course names, which follow certain rules, ie. for automatic allocation, but from the schema's view they're just opaque names, strings, text. > Especially for invoices we need some automatism. Some govern- > ments - Germany !!! - forces companies to provide an determi- > nistic numbering scheme for invoices. So this field cannot be > assigned manually to each invoice. Leave this to the user/admin. It should be clear that the "invoice_no" field cannot be an object id. So the first step is to introduce an separate oid field (fed by some sequence) and let *all* references point on that field. From now on let's call the old invoice_no field an invoice ident. The second step is to implement an customizable scheme for autmatic invoice ident allocation. Maybe put this into an separate class, which can be easily adoped to user's needs. Whether some crm user should be allowed to change the invoice idents is just an permission issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 11:24:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:24:50 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511170702.C16456@Strawberry.COM> References: <20070511145714.GH19509@nibiru.local> <20070511170702.C16456@Strawberry.COM> Message-ID: <20070511152450.GJ19509@nibiru.local> * Jens Hamisch schrieb: switching this thread to german: > Eine Stundung? Ok. Man kann Rechnungen nur komplett stunden ? F?r Ratenzahlung, etc haben wir noch kein Handling ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From fp at crm-now.de Fri May 11 12:27:42 2007 From: fp at crm-now.de (Frank Piepiorra) Date: Fri, 11 May 2007 18:27:42 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: Message-ID: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Enrico, any chance that you post your contribution as files at vtigerForge? Regards, Frank From weigelt at metux.de Fri May 11 14:11:59 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:11:59 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> References: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Message-ID: <20070511181159.GA25485@nibiru.local> * Frank Piepiorra schrieb: Hi, > any chance that you post your contribution as files at vtigerForge? any chance for doing this per command line ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- From gopals at vtiger.com Fri May 11 14:34:35 2007 From: gopals at vtiger.com (Gopal) Date: Sat, 12 May 2007 00:04:35 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511135717.GD19509@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> Message-ID: <4644B73B.70005@vtiger.com> Hi Enrico, Thanks for your suggestions to take vtiger to next level. Please don't hesitate to highlight issues (if any) in various places. In fact Philip has tried to integrate your patch with our 5.0.3 release. However, he is unsuccessful. It will be of great help, if you could spend your valuable time on our forthcoming 5.0.3 release. I am confident, with our community support we can release a better product. Best Regards, Gopal (vtiger Team) Enrico Weigelt wrote: > * Philip schrieb: > > Hi, > > >> When tested the code i had the following exception thrown in the screen. >> >> *Fatal error*: Uncaught exception 'Exception' with message 'given result >> set is not an object' in >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 >> Stack trace: #0 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): >> PearDatabase->query_result(false, 0, 'count') #1 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): >> include('/home/crm-test3...') #2 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): >> require_once('/home/crm-test3...') #3 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): >> require_once('/home/crm-test3...') #4 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): >> include('/home/crm-test3...') #5 {main} thrown in >> */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* >> on line *442 >> > > Looks like an bug in Potentials/ListView.php. > Probably an query failed and so $result is empty. > > We've lots of such issues everywhere :( > > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070512/b5575516/attachment.html From weigelt at metux.de Fri May 11 14:55:11 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:55:11 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <4644B73B.70005@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> Message-ID: <20070511185511.GB25485@nibiru.local> * Gopal schrieb: Hi, > In fact Philip has tried to integrate your patch with our 5.0.3 > release. However, he is unsuccessful. It will be of great help, if you > could spend your valuable time on our forthcoming 5.0.3 release. I'm entirely working on Jens's 5.1 branch, since I need postgres. IMHO we first should get 5.0.3 and 5.1_jens merged. My patches are divided into two groups: *jens*.diff -> the changes from 5.1_jens to jens' personal tree *nekrad*.diff -> my own changes based on jens' tree. Maybe, in some cases the ordering could be significant (although it *should* not ;-O) Some of my patches *might* also work on 5.0.3, but I didn't check. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From philip at vtiger.com Mon May 14 02:20:29 2007 From: philip at vtiger.com (Philip) Date: Mon, 14 May 2007 11:50:29 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511185511.GB25485@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> <20070511185511.GB25485@nibiru.local> Message-ID: <4647FFAD.3020804@vtiger.com> Hi Enrico, Regarding the patch, to overcome the empty result error you have given the throw exception, function but whenever we use throw exception, we need to use catch function, because of this i got uncaught exception during the patch integration. Does the patch works fine with out caught function in your setup? if not where do we need to include this catch function? Any help would be highly appreciated. Regards, Philip Enrico Weigelt wrote: > * Gopal schrieb: > > Hi, > > >> In fact Philip has tried to integrate your patch with our 5.0.3 >> release. However, he is unsuccessful. It will be of great help, if you >> could spend your valuable time on our forthcoming 5.0.3 release. >> > > I'm entirely working on Jens's 5.1 branch, since I need postgres. > IMHO we first should get 5.0.3 and 5.1_jens merged. > > My patches are divided into two groups: > > *jens*.diff -> the changes from 5.1_jens to jens' personal tree > *nekrad*.diff -> my own changes based on jens' tree. > > Maybe, in some cases the ordering could be significant > (although it *should* not ;-O) > > > Some of my patches *might* also work on 5.0.3, but I didn't check. > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070514/4c27c9ee/attachment-0002.html From anugupta at pu.ac.in Mon May 14 04:59:42 2007 From: anugupta at pu.ac.in (Anu Gupta DCSA) Date: Mon, 14 May 2007 15:29:42 +0630 Subject: [Vtigercrm-developers] A Survey on Defect Management Practices in Free/Open Source Software Message-ID: <20070514085932.M82540@pu.ac.in> Sir/Madam I seek help from designers, developers, testers,defect fixers,project managers or playing any other key role in Free/Open Source software development or maintenence in carrying out a study on practices and problems of defect management in various Free/Open Source Software projects. The insights gained from the study can further help us to extract publicly accessible defect data and determine impact of defect management practices on software quality. Please spend a few minutes of your precious time to fill up the Questionnaire. The most of the questions follow multiple choice formats and are quite easy to answer. To have the Online Questionnaire, please visit: http://anu.puchd.ac.in/phpESP/public/survey.php?name=FOSS_Defect_Survey (You can also copy and paste this link into your browser, and hit the 'Return' key.) I hope you will find all the questions interesting and thought-provoking. Your answers will be kept anonymous.The data thus collected will only be used for research purpose.It would be nice if you may further refer this mail to others actively engaged with Free/Open Source Software development. If you have any query or suggestions then feel free to contact. Thank You With regards, Anu Gupta Senior Lecturer Department of Computer Science and Applications, Panjab University, Chandigarh. INDIA In case of any problem in accessing/using the above mentioned link please contact: E-mail: anugupta at pu.ac.in anugupta98 at gmail.com From joe at tsolucio.com Tue May 15 19:56:04 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 16 May 2007 01:56:04 +0200 Subject: [Vtigercrm-developers] Custom Invoice Number Message-ID: <464A4894.1060001@tsolucio.com> Hi, I have just looked at this code. I believe that this is not the correct way to solve the autoincrement problem Perfectioning the code that already exists in forum/wiki for this you would have had a more complete solution that would serve any module. Instead you have whipped up your own solution which is probably not multi-user safe, you have hardcoded english text into a checkduplicate function which would not be necessary if you were using the database which is already transaction and multiuser safe and you are writing php files with code each time an invoice is made. Have you at all thought about 4-5 people making invoices at a time? Why are you still hardcoding strings in the code? Why not trust the database to avoid overlapping? I mean the database guys have solved this problem a long time ago, who are we to invent a new untested system? As normal you leave aside the community. I know I am becomming a persona non grata here, but somebody has to say these things. If you keep in this line this product is doomed. Joe TSolucio From davidv.net at gmail.com Wed May 16 09:09:47 2007 From: davidv.net at gmail.com (David V.) Date: Wed, 16 May 2007 09:09:47 -0400 Subject: [Vtigercrm-developers] Custom Invoice Number In-Reply-To: <464A4894.1060001@tsolucio.com> References: <464A4894.1060001@tsolucio.com> Message-ID: Joe, You are beeing a bit hard here but thank you for reporting this. I'm also waiting for a better solution for invoices number but I have to admit I did not spend the necessary time to look at the new code in 5.0.3. Thank you. David V. 2007/5/15, Joe Bordes : > Hi, > > I have just looked at this code. > I believe that this is not the correct way to solve the autoincrement > problem > Perfectioning the code that already exists in forum/wiki for this you > would have had a more complete solution that would serve any module. > Instead you have whipped up your own solution which is probably not > multi-user safe, you have hardcoded english text into a checkduplicate > function which would not be necessary if you were using the database > which is already transaction and multiuser safe and you are writing php > files with code each time an invoice is made. > Have you at all thought about 4-5 people making invoices at a time? > Why are you still hardcoding strings in the code? > Why not trust the database to avoid overlapping? I mean the database > guys have solved this problem a long time ago, who are we to invent a > new untested system? > > As normal you leave aside the community. > > I know I am becomming a persona non grata here, but somebody has to say > these things. If you keep in this line this product is doomed. > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From chazarra.clement at gmail.com Mon May 21 09:20:04 2007 From: chazarra.clement at gmail.com (clement chazarra) Date: Mon, 21 May 2007 14:20:04 +0100 Subject: [Vtigercrm-developers] Security focus Message-ID: Hello everybody, I just wanted to point out a little document from drupal community highlighting secure ways to code. http://drupal.org/writing-secure-code My suggestion would even be to add in the wiki a "Security focus" page where we could add the different techniques developers should follow to produce secure code. If at some points the list seems quite complete and up to date, it might be a good idea to schedule a release dedicated on that matter and upgrade the whole code. Other pages in the wiki could be created as well, focusing on different important matters like performance/usability/etc. Byebye Clem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070521/b4c9e07d/attachment.html From joe at tsolucio.com Mon May 28 11:40:07 2007 From: joe at tsolucio.com (Joe Bordes) Date: Mon, 28 May 2007 17:40:07 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 Message-ID: <1180366807.23252.14.camel@joesunix.int> Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio From aissa at abonlinesolutions.com Mon May 28 11:42:41 2007 From: aissa at abonlinesolutions.com (=?iso-8859-1?B?Qe9zc2E=?=) Date: Mon, 28 May 2007 17:42:41 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <1180366807.23252.14.camel@joesunix.int> References: <1180366807.23252.14.camel@joesunix.int> Message-ID: <000001c7a13e$d4db3ad0$7e91b070$@com> Idem here, it's bizarre. A?ssa ABOnline solutions -----Message d'origine----- De?: Joe Bordes [mailto:joe at tsolucio.com] Envoy??: lundi 28 mai 2007 17:40 ??: vtigercrm-developers at lists.vtigercrm.com Objet?: [Vtigercrm-developers] svn trunk in branches/5.0.3 Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From richie at vtiger.com Mon May 28 17:26:08 2007 From: richie at vtiger.com (richie) Date: Tue, 29 May 2007 02:56:08 +0530 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <000001c7a13e$d4db3ad0$7e91b070$@com> References: <1180366807.23252.14.camel@joesunix.int> <000001c7a13e$d4db3ad0$7e91b070$@com> Message-ID: <465B48F0.1020908@vtiger.com> Yes. Michel jaquemes had checked in the entire application as a separate folder. I have removed it. Pl. try now. Michel: I have revoked your permission to do mischief for now ;-) *Richie* A?ssa wrote: > Idem here, it's bizarre. > A?ssa > ABOnline solutions > > -----Message d'origine----- > De : Joe Bordes [mailto:joe at tsolucio.com] > Envoy? : lundi 28 mai 2007 17:40 > ? : vtigercrm-developers at lists.vtigercrm.com > Objet : [Vtigercrm-developers] svn trunk in branches/5.0.3 > > Hi, > > I just "updated" my svn version and recieved a new "trunk" directory > containing the whole application???? > > Joe > TSolucio > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/cbcb280f/attachment.html From brian at pr2k.com Tue May 29 22:34:18 2007 From: brian at pr2k.com (Brian Laughlin) Date: Tue, 29 May 2007 19:34:18 -0700 Subject: [Vtigercrm-developers] Patch for decoupling Accounts from Potential Message-ID: <27CABE0A5EFD714EA5B2F9B47EE5CB85EDD693@svawmc1.awnow.local> We have a simple way of accomplishing this. Would love to see this or something like it roled into the main branch after 5.0.3 is released. http://forums.vtiger.com/viewtopic.php?p=47584#47584 Regards, Brian Laughlin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/3b8f7b0a/attachment-0001.html From gopals at vtiger.com Thu May 31 08:41:42 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 31 May 2007 18:11:42 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <465EC286.9060507@vtiger.com> Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal From richie at vtiger.com Thu May 31 09:12:34 2007 From: richie at vtiger.com (richie) Date: Thu, 31 May 2007 18:42:34 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC286.9060507@vtiger.com> References: <465EC286.9060507@vtiger.com> Message-ID: <465EC9C2.8040301@vtiger.com> Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 Thank you all for your patience and faith, *Richie* Gopal wrote: > Dear Team, > > I am happy to inform you all that we have successfully completed all our > routine tests. We are expecting release in another few hours time. > > Thanks & Regards, > Gopal > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/74578fc5/attachment-0001.html From brett.hooker at roarz.com Thu May 31 09:48:38 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 31 May 2007 23:48:38 +1000 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC9C2.8040301@vtiger.com> References: <465EC286.9060507@vtiger.com> <465EC9C2.8040301@vtiger.com> Message-ID: <465ED236.30205@roarz.com> Definition of popularity? Bringing SourceForge down when you release a product: richie wrote: > Dear Team, > > vtigercrm-5.0.3 is officially released. > You can have a look at the files at > http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 > > Thank you all for your patience and faith, > *Richie* > > Gopal wrote: >> Dear Team, >> >> I am happy to inform you all that we have successfully completed all our >> routine tests. We are expecting release in another few hours time. >> >> Thanks & Regards, >> Gopal >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0002.html -------------- next part -------------- A non-text attachment was scrubbed... Name: vt503dl-error.png Type: image/png Size: 52074 bytes Desc: not available Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment.png From rvpromociones at yahoo.es Thu May 31 19:00:58 2007 From: rvpromociones at yahoo.es (Yosu Cadilla) Date: Thu, 31 May 2007 23:00:58 +0000 (GMT) Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <20070531230058.75110.qmail@web28008.mail.ukl.yahoo.com> Indeed! Saludos, Yosu Cadilla. ____________________________________________________________________________________ ?Descubre una nueva forma de obtener respuestas a tus preguntas! Entra en Yahoo! Respuestas. http://es.answers.yahoo.com/info/welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/14773489/attachment-0001.html From weigelt at metux.de Tue May 1 13:58:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 19:58:50 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <20070501175850.GB26224@nibiru.local> * Jorge Torres schrieb: Hi, > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that > may differ a lot from what vtiger golas might be, therefore I want > to start a new project at sourceforge.net based on vtigerCRM 5. Of course you're free to do your own fork, but I'd like to invite you to contribute to the upstream. If you're moving too far from the upstream, we cannot benefit from each other's work anymore. BTW: I'm currently working on my own branch for really porting it to postgresql. There're lots of things to clean up here. Once this is is done (and hopefully went to the upstream), I'm going to some works on making it easier to use (ie. switch off unused features). Maybe you'd like to join me ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Tue May 1 15:48:36 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 1 May 2007 14:48:36 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501175850.GB26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> Message-ID: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Enrico, Sure count me in, Can you send me some of your todo list, so I can check what I'm capable of helping with? That minimized branch you mentioned, would it still support MySQL? At this moment, I'm working on changing the pop-up windows, for WebWM windows, anyhow I will prepare a todo list I have in mind, so you get to see where we can join forces. Thank you, Jorge On 5/1/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Of course you're free to do your own fork, but I'd like to invite > you to contribute to the upstream. If you're moving too far from the > upstream, we cannot benefit from each other's work anymore. > > BTW: I'm currently working on my own branch for really porting it to > postgresql. There're lots of things to clean up here. Once this is > is done (and hopefully went to the upstream), I'm going to some > works on making it easier to use (ie. switch off unused features). > > Maybe you'd like to join me ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070501/689d85dc/attachment-0002.html From weigelt at metux.de Tue May 1 16:05:52 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 22:05:52 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Message-ID: <20070501200552.GC26224@nibiru.local> * Jorge Torres schrieb: Hi, > Can you send me some of your todo list, so I can check what > I'm capable of helping with? The most important, for now, is to replace all the $adb->query_result() calls, since a) it does not work with postgresql (adodb brokenness) and b) it's an huge resource waster. > That minimized branch you mentioned, would it still support MySQL? Yep. I don't intend to drop it. > At this moment, I'm working on changing the pop-up windows, for WebWM > windows, anyhow I will prepare a todo list I have in mind, so you get to see > where we can join forces. Ok. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From dome at tel.co.th Tue May 1 21:06:13 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 08:06:13 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> What's status of your poetgresql branch ? Can i test ? Dome C. On 5/2/07, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From gopals at vtiger.com Wed May 2 00:19:25 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 02 May 2007 09:49:25 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <4638114D.5010303@vtiger.com> Hi Jorge, Thanks for your interest in vtiger CRM project. Please see my response below (in blue color) Jorge Torres wrote: > Hi everyone, > > First I want to tell you developers that I admire your work. I first > downloaded vtiger a few days ago, for customer relationship management > at my uncles little ceramic factory, and I was amazed, but after I > showed it to him, well, it seems that it is too much for what my uncle > wants. * Gopal:* From the Security settings module, you can disable modules/fields that are not required. Please get back to me if you need any further clarifications. > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that may > differ a lot from what vtiger golas might be, therefore I want to > start a new project at sourceforge.net based > on vtigerCRM 5. * Gopal:* Down the road, we are planning to make vtiger CRM - fully customizable so that business users configure the vtiger system instead of hacking the code. Could you please post your goals, so that we will cross-check our road map and let you know our position? > I don't understand to much about Open Source Licencing restrictions > and related stuff, so please excuse my ignorance. My question are: * Gopal:* vtiger CRM code base contains our _*own contributions*_ and many third-party packages. Our own contributions are released under _vtiger Public License (based on Mozilla Public License)_. Please refer to the following URL for details about licenses of third-party packages: http://wiki.vtiger.com/index.php/Third_Party_Software > > Can I start a new project at sourceforge based on vtiger? * Gopal:* In general there are no issues in forking open source projects, provided you are not violating the Open Source license of your predecessor. > If so, Would I have to cover it under some other new license type? *Gopal:* Release your contributions under some Open Source license which meets your requirements. > Do I need some permit from vtiger team to start such project? * Gopal:* _vtiger CRM code base_ is 100% open source by spirit. Hence you may not require special permission from our side. > I know about removing logos because of trademarks, what else do I have > to remove? * > * * Gopal:* Kindly review the vtiger and other third-party licenses with your Legal adviser (council) before modifying back-end/front-end code base. On a separate note, our community is actively participating in vtiger development. Most of the community members (developers/testers/writers/translators) are directly contributing to the core code base (For example: PostgreSQL & DMS branches in our SVN). http://vtiger.fosslabs.com We are also encouraging many add-on projects based on vtiger CRM, which cater to the need of user-specific requirements. For more details, please refer to our vtigerForge: http://vtigerforge.com Best wishes, Gopal (vtiger - Team Member) > > Well that's it for now, I will continue on my "trying to understand > vtiger's code" task, so I will probably have some questions related to > developing in short. > > Thank you very much, > > > Jorge > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/48cab81f/attachment-0002.html From jens at Strawberry.COM Wed May 2 02:20:57 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:20:57 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local>; from Enrico Weigelt on Tue, May 01, 2007 at 10:05:52PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <20070502082057.D16394@Strawberry.COM> Hi, I already did a port to postgresql and have contributed my patches to Don and Ritchie so far. I do not agree that the $adb->query_results are broken as I'm running on postgresql since 5.0rc1 ... Jens On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 2 02:21:30 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:21:30 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:06:13AM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502082130.E16394@Strawberry.COM> You may use the 5.1_jens branch which is working. Jens On Wed, May 02, 2007 at 08:06:13AM +0700, Dome Charoenyost wrote: > What's status of your poetgresql branch ? > > Can i test ? > > Dome C. > > > On 5/2/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 2 06:35:59 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 12:35:59 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638114D.5010303@vtiger.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> Message-ID: <1178102159.31989.24.camel@joesunix.int> Hi, I read this thread and I just keep asking myself: what am I doing wrong? You guys have branches and are participating. I have been asking to help for a long time now and I am just being ignored. I really would like to help and work together. Joe TSolucio El mi?, 02-05-2007 a las 09:49 +0530, Gopal escribi?: > Hi Jorge, > > Thanks for your interest in vtiger CRM project. > > Please see my response below (in blue color) > > Jorge Torres wrote: > > Hi everyone, > > > > First I want to tell you developers that I admire your work. I first > > downloaded vtiger a few days ago, for customer relationship > > management at my uncles little ceramic factory, and I was amazed, > > but after I showed it to him, well, it seems that it is too much for > > what my uncle wants. > > Gopal: From the Security settings module, you can disable > modules/fields that are not required. Please get back to me if you > need any further clarifications. > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Gopal: Down the road, we are planning to make vtiger CRM - fully > customizable so that business users configure the vtiger system > instead of hacking the code. Could you please post your goals, so > that we will cross-check our road map and let you know our position? > > I don't understand to much about Open Source Licencing restrictions > > and related stuff, so please excuse my ignorance. My question are: > > Gopal: vtiger CRM code base contains our own contributions and many > third-party packages. Our own contributions are released under vtiger > Public License (based on Mozilla Public License). Please refer to the > following URL for details about licenses of third-party packages: > > http://wiki.vtiger.com/index.php/Third_Party_Software > > > > Can I start a new project at sourceforge based on vtiger? > > Gopal: In general there are no issues in forking open source projects, > provided you are not violating the Open Source license of your > predecessor. > > If so, Would I have to cover it under some other new license type? > Gopal: Release your contributions under some Open Source license which > meets your requirements. > > Do I need some permit from vtiger team to start such project? > > Gopal: vtiger CRM code base is 100% open source by spirit. Hence you > may not require special permission from our side. > > I know about removing logos because of trademarks, what else do I > > have to remove? > > Gopal: Kindly review the vtiger and other third-party licenses with > your Legal adviser (council) before modifying back-end/front-end code > base. > > On a separate note, our community is actively participating in vtiger > development. Most of the community members > (developers/testers/writers/translators) are directly contributing to > the core code base (For example: PostgreSQL & DMS branches in our > SVN). > > http://vtiger.fosslabs.com > > We are also encouraging many add-on projects based on vtiger CRM, > which cater to the need of user-specific requirements. For more > details, please refer to our vtigerForge: > > http://vtigerforge.com > > Best wishes, > Gopal > (vtiger - Team Member) > > > > Well that's it for now, I will continue on my "trying to understand > > vtiger's code" task, so I will probably have some questions related > > to developing in short. > > > > Thank you very much, > > > > > > Jorge > > > > ____________________________________________________________________ > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Wed May 2 06:56:24 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 12:56:24 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502105624.GA5311@nibiru.local> * Dome Charoenyost schrieb: > What's status of your poetgresql branch ? Work is still in progress. > Can i test ? I'll try to get some patches ready today. Or should I upload to SVN (need some short howto, I'm not really expierenced w/ svn) ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 2 07:13:36 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 13:13:36 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <20070502111336.GB5311@nibiru.local> * Jens Hamisch schrieb: Hi, > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... well, I can only speak for the latest release and my trunk checkout of last week. a) several things in schema create needed to be fixed b) schema update (ie. ALTER TABLE ...) was totally broken c) the adodb Move() method was completely missing in the postgres driver And the $adb->query_results() thing: Well, it's and really bad idea (even if pgsql->Move() would work). Too much complexity in- and outside, too long codepathes, too inefficient. I've introduced some new query functions: * $adb->run_query_allrecords($query) -> returns the result in an array/list records (associative arrays) * $adb->run_query_record($query) -> returns only the first record. * $adb->run_query_field($query,$field) -> returns given field from the first record * $adb->run_query_list($query,$field) -> returns an list of the values from given field. Now I'm in the process of rewriting the calls to query_result() to an appropriate of the new functions. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 2 09:24:47 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 15:24:47 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502111336.GB5311@nibiru.local>; from Enrico Weigelt on Wed, May 02, 2007 at 01:13:36PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> Message-ID: <20070502152447.A6085@Strawberry.COM> Hi, please have a look at the 5.1_jens branch at first! This is a 5.0.3 release sucessfully running on postgresql. This version is stable. The database fixes were introduced in an early 5.0 prerelease. I'm running vtiger on postgres since then. Part of the patches were already implemented in 5.0GA. The rest was posted to Richie/Don about 3 weeks ago. JenS On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > I already did a port to postgresql and have contributed my patches to > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > broken as I'm running on postgresql since 5.0rc1 ... > > well, I can only speak for the latest release and my trunk checkout > of last week. > > a) several things in schema create needed to be fixed > b) schema update (ie. ALTER TABLE ...) was totally broken > c) the adodb Move() method was completely missing in the postgres driver > > And the $adb->query_results() thing: > Well, it's and really bad idea (even if pgsql->Move() would work). > Too much complexity in- and outside, too long codepathes, too inefficient. > > I've introduced some new query functions: > > * $adb->run_query_allrecords($query) > -> returns the result in an array/list records (associative arrays) > > * $adb->run_query_record($query) > -> returns only the first record. > > * $adb->run_query_field($query,$field) > -> returns given field from the first record > > * $adb->run_query_list($query,$field) > -> returns an list of the values from given field. > > Now I'm in the process of rewriting the calls to query_result() > to an appropriate of the new functions. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 09:45:38 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:45:38 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502152447.A6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> Message-ID: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> i still found error on 5.1_jens Fatal error: Call to a member function on a non-object in /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 postgresql 8.1 php4.4 Debian etch Dome C. On 5/2/07, Jens Hamisch wrote: > > Hi, > > please have a look at the 5.1_jens branch at first! This is > a 5.0.3 release sucessfully running on postgresql. > This version is stable. The database fixes were introduced in > an early 5.0 prerelease. I'm running vtiger on postgres since > then. > > Part of the patches were already implemented in 5.0GA. The rest > was posted to Richie/Don about 3 weeks ago. > > JenS > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > * Jens Hamisch schrieb: > > > > Hi, > > > > > I already did a port to postgresql and have contributed my patches to > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > well, I can only speak for the latest release and my trunk checkout > > of last week. > > > > a) several things in schema create needed to be fixed > > b) schema update (ie. ALTER TABLE ...) was totally broken > > c) the adodb Move() method was completely missing in the postgres driver > > > > And the $adb->query_results() thing: > > Well, it's and really bad idea (even if pgsql->Move() would work). > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > I've introduced some new query functions: > > > > * $adb->run_query_allrecords($query) > > -> returns the result in an array/list records (associative arrays) > > > > * $adb->run_query_record($query) > > -> returns only the first record. > > > > * $adb->run_query_field($query,$field) > > -> returns given field from the first record > > > > * $adb->run_query_list($query,$field) > > -> returns an list of the values from given field. > > > > Now I'm in the process of rewriting the calls to query_result() > > to an appropriate of the new functions. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From dome at tel.co.th Wed May 2 09:46:16 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:46:16 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502105624.GA5311@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> <20070502105624.GA5311@nibiru.local> Message-ID: <8ccbff060705020646h4c848925k30338b574e6c2d60@mail.gmail.com> Please send me patch Thanks. Dome C. On 5/2/07, Enrico Weigelt wrote: > * Dome Charoenyost schrieb: > > What's status of your poetgresql branch ? > > Work is still in progress. > > > Can i test ? > > I'll try to get some patches ready today. > > Or should I upload to SVN (need some short howto, I'm not > really expierenced w/ svn) ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 10:37:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 16:37:37 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:45:38PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> Message-ID: <20070502163737.B6085@Strawberry.COM> Hi, I'm running php 5.1.4. According to the installation manual, 5.0.x thru 5.2.x is supported only. Jens On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > i still found error on 5.1_jens > Fatal error: Call to a member function on a non-object in > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > postgresql 8.1 > php4.4 > > Debian etch > > Dome C. > > > > On 5/2/07, Jens Hamisch wrote: > > > > Hi, > > > > please have a look at the 5.1_jens branch at first! This is > > a 5.0.3 release sucessfully running on postgresql. > > This version is stable. The database fixes were introduced in > > an early 5.0 prerelease. I'm running vtiger on postgres since > > then. > > > > Part of the patches were already implemented in 5.0GA. The rest > > was posted to Richie/Don about 3 weeks ago. > > > > JenS > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > * Jens Hamisch schrieb: > > > > > > Hi, > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > well, I can only speak for the latest release and my trunk checkout > > > of last week. > > > > > > a) several things in schema create needed to be fixed > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > And the $adb->query_results() thing: > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > I've introduced some new query functions: > > > > > > * $adb->run_query_allrecords($query) > > > -> returns the result in an array/list records (associative arrays) > > > > > > * $adb->run_query_record($query) > > > -> returns only the first record. > > > > > > * $adb->run_query_field($query,$field) > > > -> returns given field from the first record > > > > > > * $adb->run_query_list($query,$field) > > > -> returns an list of the values from given field. > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > to an appropriate of the new functions. > > > > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 11:22:52 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 22:22:52 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502163737.B6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> Message-ID: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> I'm test on php 5.2 found object to string error ( in log->debug) when create new contact Call to a member function Move() on a non-object in /var/www/crmpgsql/include/database/PearDatabase.php on line 441 Dome C. On 5/2/07, Jens Hamisch wrote: > Hi, > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > 5.2.x is supported only. > > Jens > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > i still found error on 5.1_jens > > Fatal error: Call to a member function on a non-object in > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > postgresql 8.1 > > php4.4 > > > > Debian etch > > > > Dome C. > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > Hi, > > > > > > please have a look at the 5.1_jens branch at first! This is > > > a 5.0.3 release sucessfully running on postgresql. > > > This version is stable. The database fixes were introduced in > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > then. > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > was posted to Richie/Don about 3 weeks ago. > > > > > > JenS > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > * Jens Hamisch schrieb: > > > > > > > > Hi, > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > of last week. > > > > > > > > a) several things in schema create needed to be fixed > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > And the $adb->query_results() thing: > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > I've introduced some new query functions: > > > > > > > > * $adb->run_query_allrecords($query) > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > * $adb->run_query_record($query) > > > > -> returns only the first record. > > > > > > > > * $adb->run_query_field($query,$field) > > > > -> returns given field from the first record > > > > > > > > * $adb->run_query_list($query,$field) > > > > -> returns an list of the values from given field. > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > to an appropriate of the new functions. > > > > > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 12:00:05 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 18:00:05 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 10:22:52PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> Message-ID: <20070502180005.A6711@Strawberry.COM> Hi Richie, didn't Mr. Priebsch tell us something about name space modifications between php 5.1.x and 5.2.0? In fact the version running at my side (php 5.1.4) seems run into problems on 5.2.0 ... Jens On Wed, May 02, 2007 at 10:22:52PM +0700, Dome Charoenyost wrote: > I'm test on php 5.2 found object to string error ( in log->debug) > > when create new contact > Call to a member function Move() on a non-object in > /var/www/crmpgsql/include/database/PearDatabase.php on line 441 > > Dome C. > > On 5/2/07, Jens Hamisch wrote: > > Hi, > > > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > > 5.2.x is supported only. > > > > Jens > > > > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > > i still found error on 5.1_jens > > > Fatal error: Call to a member function on a non-object in > > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > > > postgresql 8.1 > > > php4.4 > > > > > > Debian etch > > > > > > Dome C. > > > > > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > > > Hi, > > > > > > > > please have a look at the 5.1_jens branch at first! This is > > > > a 5.0.3 release sucessfully running on postgresql. > > > > This version is stable. The database fixes were introduced in > > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > > then. > > > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > > was posted to Richie/Don about 3 weeks ago. > > > > > > > > JenS > > > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > > * Jens Hamisch schrieb: > > > > > > > > > > Hi, > > > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > > of last week. > > > > > > > > > > a) several things in schema create needed to be fixed > > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > > > And the $adb->query_results() thing: > > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > > > I've introduced some new query functions: > > > > > > > > > > * $adb->run_query_allrecords($query) > > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > > > * $adb->run_query_record($query) > > > > > -> returns only the first record. > > > > > > > > > > * $adb->run_query_field($query,$field) > > > > > -> returns given field from the first record > > > > > > > > > > * $adb->run_query_list($query,$field) > > > > > -> returns an list of the values from given field. > > > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > > to an appropriate of the new functions. > > > > > > > > > > > > > > > cu > > > > > -- > > > > > --------------------------------------------------------------------- > > > > > Enrico Weigelt == metux IT service > > > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > > fax: +49 36207 519932 email: contact at metux.de > > > > > cellphone: +49 174 7066481 > > > > > --------------------------------------------------------------------- > > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > > --------------------------------------------------------------------- > > > > > _______________________________________________ > > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > > -- > > > > > > > > -------------------------------------------------------------------------------- > > > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > > SSSSS-----SSSSS > > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > > SSSSSSSSS Jens Hamisch > > > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 2 12:31:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 18:31:09 +0200 Subject: [Vtigercrm-developers] insert data function Message-ID: <20070502163109.GA19391@nibiru.local> Hi folks, JFYI: I've added an new function run_insert_data($table,$data) to the PearDatabase lass ($adb). It handles the cases where simply one record is inserted to some table. The sql query is built from an associative array (in fact this is done by sql_insert_data()), executed and if an error is detected, an error is thrown. I'm going to submit an patch this afternoon. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 2 15:13:25 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:13:25 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Hi, Since it is now clear that postgres is supported, the only thing would be about Enrico's opinion of adb->query_results being resource wasting, which is very important regardless of mysql or postgres use, Enrico, what are you doing instead of using the query_results method? About the other thing here is a todo list which could possibly be common with vtiger's: - Use WebWM (webwm.sourceforge.net), instead of porpup windows which are blocked by internet explorer and sometimes firefox, also use WebWM for virtual windows, such as the ones in editing custom fields. - I don't know why imap email doest work, I get the message that email should be configured, even if it is in fact configured, well so i will try to fix that, + adding imap options to the Add user template, - DHTML Customizable pdf sheet creator for sales-orders and the others, - AJAX calendar refresh, and adding standard calendar view on a floating window. - Date field DHTML floating box. - Help DHTML widgets, which will soon be offered by the webwm framework. - Translation facility, probably a script that reads every lang file, and organizes it in a HTML form, and then form it regenerate the lang files, so language translation can be made from web, rather that getting into the code, + the fact of making it a lot more easier when adding new definitions and translating them to the other files. Well with that I think I have lot to play with for some time. Thank you, Jorge On 5/2/07, Jens Hamisch wrote: > > > Hi, > > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... > > Jens > > > On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get > to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/1c28fc7c/attachment-0003.html From joe at tsolucio.com Wed May 2 15:37:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 21:37:14 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <4638E86A.70707@tsolucio.com> Hi Jorge, Jorge Torres escribi?: > Hi, > > Since it is now clear that postgres is supported, the only thing would > be about Enrico's opinion of adb->query_results being resource > wasting, which is very important regardless of mysql or postgres use, > Enrico, what are you doing instead of using the query_results method? > > About the other thing here is a todo list which could possibly be > common with vtiger's: > > - Use WebWM (webwm.sourceforge.net ), > instead of porpup windows which are blocked by internet explorer and > sometimes firefox, also use WebWM for virtual windows, such as the > ones in editing custom fields. > Really nice. Hope you can get somewhere. > - I don't know why imap email doest work, I get the message that email > should be configured, even if it is in fact configured, well so i will > try to fix that, + adding imap options to the Add user template, > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > - AJAX calendar refresh, and adding standard calendar view on a > floating window. > > - Date field DHTML floating box. > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > - Translation facility, probably a script that reads every lang file, > and organizes it in a HTML form, and then form it regenerate the lang > files, so language translation can be made from web, rather that > getting into the code, + the fact of making it a lot more easier when > adding new definitions and translating them to the other files. > Try the Language Wizard in vtigerforge. This is what I use and I think it is a very good module, it does exactly what you are asking for. > Well with that I think I have lot to play with for some time. > > Thank you, > > Jorge > Joe TSolucio From jorge.torres.maldonado at gmail.com Wed May 2 15:59:12 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:59:12 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638E86A.70707@tsolucio.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <4638E86A.70707@tsolucio.com> Message-ID: <530c7d700705021259r4d70223cmd6981af85d4d1360@mail.gmail.com> Thanks Joe, language module seems awesome On 5/2/07, Joe Bordes wrote: > > Hi Jorge, > > Jorge Torres escribi?: > > Hi, > > > > Since it is now clear that postgres is supported, the only thing would > > be about Enrico's opinion of adb->query_results being resource > > wasting, which is very important regardless of mysql or postgres use, > > Enrico, what are you doing instead of using the query_results method? > > > > About the other thing here is a todo list which could possibly be > > common with vtiger's: > > > > - Use WebWM (webwm.sourceforge.net ), > > instead of porpup windows which are blocked by internet explorer and > > sometimes firefox, also use WebWM for virtual windows, such as the > > ones in editing custom fields. > > > Really nice. Hope you can get somewhere. > > > - I don't know why imap email doest work, I get the message that email > > should be configured, even if it is in fact configured, well so i will > > try to fix that, + adding imap options to the Add user template, > > > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > > > - AJAX calendar refresh, and adding standard calendar view on a > > floating window. > > > > - Date field DHTML floating box. > > > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > > > - Translation facility, probably a script that reads every lang file, > > and organizes it in a HTML form, and then form it regenerate the lang > > files, so language translation can be made from web, rather that > > getting into the code, + the fact of making it a lot more easier when > > adding new definitions and translating them to the other files. > > > Try the Language Wizard in vtigerforge. This is what I use and I think > it is a very good module, it does exactly what you are asking for. > > Well with that I think I have lot to play with for some time. > > > > Thank you, > > > > Jorge > > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/3ed19b0a/attachment-0001.html From weigelt at metux.de Wed May 2 22:36:53 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 04:36:53 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <20070503023653.GA29236@nibiru.local> * Jorge Torres schrieb: Hi, > Since it is now clear that postgres is supported, the only thing would be > about Enrico's opinion of adb->query_results being resource wasting, which > is very important regardless of mysql or postgres use, Enrico, what are > you doing instead of using the query_results method? As already said: introduced some new functions, which fetch either one record (run_query_record() and run_query_field()) or all records (run_query_allrecords() and run_query_list()) and simply return the data. There are several result types: a) just one scalar: -> run_query_field($query,$fieldname) --> returns an scalar b) just one record: -> run_query_record($query) --> returns an associative array c) an list of scalars -> run_query_list($query,$fieldname) --> returns an array/list of scalars d) an list of records: -> run_query_allreords($query) --> returns an array/list of ass. arrays cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gopals at vtiger.com Thu May 3 00:26:58 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 03 May 2007 09:56:58 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <1178102159.31989.24.camel@joesunix.int> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> <1178102159.31989.24.camel@joesunix.int> Message-ID: <46396492.7010106@vtiger.com> Hi Joe, Sorry for the inconvenience. We don't have issues in providing separate branches for our developer community. Could you please send us your future development plans to philip at vtiger.com so that he will create branches based on your requirements. Regards, Gopal Joe Bordes wrote: > Hi, > > I read this thread and I just keep asking myself: > what am I doing wrong? > > You guys have branches and are participating. I have been asking to help > for a long time now and I am just being ignored. > > I really would like to help and work together. > > Joe > TSolucio > > El mi??, 02-05-2007 a las 09:49 +0530, Gopal escribi??: > >> Hi Jorge, >> >> Thanks for your interest in vtiger CRM project. >> >> Please see my response below (in blue color) >> >> Jorge Torres wrote: >> >>> Hi everyone, >>> >>> First I want to tell you developers that I admire your work. I first >>> downloaded vtiger a few days ago, for customer relationship >>> management at my uncles little ceramic factory, and I was amazed, >>> but after I showed it to him, well, it seems that it is too much for >>> what my uncle wants. >>> >> Gopal: From the Security settings module, you can disable >> modules/fields that are not required. Please get back to me if you >> need any further clarifications. >> >>> I love PHP, and I thought that I could minimize it to what at this >>> moment I need, and in near future add more AJAX to it. I know that >>> may differ a lot from what vtiger golas might be, therefore I want >>> to start a new project at sourceforge.net based on vtigerCRM 5. >>> >> Gopal: Down the road, we are planning to make vtiger CRM - fully >> customizable so that business users configure the vtiger system >> instead of hacking the code. Could you please post your goals, so >> that we will cross-check our road map and let you know our position? >> >>> I don't understand to much about Open Source Licencing restrictions >>> and related stuff, so please excuse my ignorance. My question are: >>> >> Gopal: vtiger CRM code base contains our own contributions and many >> third-party packages. Our own contributions are released under vtiger >> Public License (based on Mozilla Public License). Please refer to the >> following URL for details about licenses of third-party packages: >> >> http://wiki.vtiger.com/index.php/Third_Party_Software >> >>> Can I start a new project at sourceforge based on vtiger? >>> >> Gopal: In general there are no issues in forking open source projects, >> provided you are not violating the Open Source license of your >> predecessor. >> >>> If so, Would I have to cover it under some other new license type? >>> >> Gopal: Release your contributions under some Open Source license which >> meets your requirements. >> >>> Do I need some permit from vtiger team to start such project? >>> >> Gopal: vtiger CRM code base is 100% open source by spirit. Hence you >> may not require special permission from our side. >> >>> I know about removing logos because of trademarks, what else do I >>> have to remove? >>> >> Gopal: Kindly review the vtiger and other third-party licenses with >> your Legal adviser (council) before modifying back-end/front-end code >> base. >> >> On a separate note, our community is actively participating in vtiger >> development. Most of the community members >> (developers/testers/writers/translators) are directly contributing to >> the core code base (For example: PostgreSQL & DMS branches in our >> SVN). >> >> http://vtiger.fosslabs.com >> >> We are also encouraging many add-on projects based on vtiger CRM, >> which cater to the need of user-specific requirements. For more >> details, please refer to our vtigerForge: >> >> http://vtigerforge.com >> >> Best wishes, >> Gopal >> (vtiger - Team Member) >> >>> Well that's it for now, I will continue on my "trying to understand >>> vtiger's code" task, so I will probably have some questions related >>> to developing in short. >>> >>> Thank you very much, >>> >>> >>> Jorge >>> >>> ____________________________________________________________________ >>> >>> _______________________________________________ >>> Reach hundreds of potential candidates - http://jobs.vtiger.com >>> >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070503/f24f5451/attachment-0003.html From jens at Strawberry.COM Thu May 3 02:54:27 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 08:54:27 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503023653.GA29236@nibiru.local>; from Enrico Weigelt on Thu, May 03, 2007 at 04:36:53AM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> Message-ID: <20070503085427.A9675@Strawberry.COM> Hi Enrico, my fixes adress syntactical postgres support only. However yours also seems to improove performance. Is there any chance to have both fixes implemented (@don,richie)? Jens On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Since it is now clear that postgres is supported, the only thing would be > > about Enrico's opinion of adb->query_results being resource wasting, which > > is very important regardless of mysql or postgres use, Enrico, what are > > you doing instead of using the query_results method? > > As already said: introduced some new functions, which fetch either > one record (run_query_record() and run_query_field()) or all records > (run_query_allrecords() and run_query_list()) and simply return the data. > > There are several result types: > > a) just one scalar: -> run_query_field($query,$fieldname) > --> returns an scalar > b) just one record: -> run_query_record($query) > --> returns an associative array > c) an list of scalars -> run_query_list($query,$fieldname) > --> returns an array/list of scalars > d) an list of records: -> run_query_allreords($query) > --> returns an array/list of ass. arrays > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Thu May 3 08:28:02 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 19:28:02 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Jens, I try to test your branch with lxampp 1.5.3a (php 5.1.4) found same error Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 Please give me more information about php,postgresql version ? Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi Enrico, > > my fixes adress syntactical postgres support only. However > yours also seems to improove performance. Is there any chance > to have both fixes implemented (@don,richie)? > > Jens > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Since it is now clear that postgres is supported, the only thing would be > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > is very important regardless of mysql or postgres use, Enrico, what are > > > you doing instead of using the query_results method? > > > > As already said: introduced some new functions, which fetch either > > one record (run_query_record() and run_query_field()) or all records > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > There are several result types: > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > --> returns an scalar > > b) just one record: -> run_query_record($query) > > --> returns an associative array > > c) an list of scalars -> run_query_list($query,$fieldname) > > --> returns an array/list of scalars > > d) an list of records: -> run_query_allreords($query) > > --> returns an array/list of ass. arrays > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Thu May 3 09:40:04 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:40:04 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503154004.D6711@Strawberry.COM> Hi, my port is running on Solaris 10, postgres 8.1.2, PHP 5.1.4 Jens On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Thu May 3 09:56:34 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:56:34 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503155634.A11877@Strawberry.COM> Hi, I've verfied the 5.1_jens PearDatabase.php to my running version and found no differences. Could you please check the one attached to this mail to the one you're testing against? Kind regards, Jens Hamisch On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 -------------- next part -------------- info("PearDatabse ->".print_r($msg,true)); } else { $log1->info("PearDatabase ->".$msg); } return $msg; } function setDieOnError($value){ $this->dieOnError = $value; } function setDatabaseType($type){ $this->dbType = $type; } function setUserName($name){ $this->userName = $name; } function setOption($name, $value){ if(isset($this->dbOptions)) $this->dbOptions[$name] = $value; if(isset($this->database)) $this->database->setOption($name, $value); } function setUserPassword($pass){ $this->userPassword = $pass; } function setDatabaseName($db){ $this->dbName = $db; } function setDatabaseHost($host){ $this->dbHostName = $host; } function getDataSourceName(){ return $this->dbType. "://".$this->userName.":".$this->userPassword."@". $this->dbHostName . "/". $this->dbName; } function startTransaction() { $this->checkConnection(); $this->println("TRANS Started"); $this->database->StartTrans(); } function completeTransaction() { if($this->database->HasFailedTrans()) $this->println("TRANS Rolled Back"); else $this->println("TRANS Commited"); $this->database->CompleteTrans(); $this->println("TRANS Completed"); } /* ADODB converted * function checkError($msg='', $dieOnError=false) * { * if($this->dbType == "mysql") * { * if (mysql_errno()) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } * return false; * } * else * { * if(!isset($this->database)) * { * $this->log->error("Database Is Not Connected"); * return true; * } * if(DB::isError($this->database)) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal($msg.$this->database->getMessage()); * die ($msg.$this->database->getMessage()); * } else { * $this->log->error($msg.$this->database->getMessage()); * } * return true; * } * } * return false; * } */ function checkError($msg='', $dieOnError=false) { /* * if($this->database->ErrorNo()) * { * if($this->dieOnError || $dieOnError) * { * $this->println("ADODB error ".$this->database->ErrorNo()); * die ($msg."ADODB error ".$this->database->ErrorNo()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } */ if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); die ($msg."ADODB error ".$msg."->".$this->database->ErrorMsg()); } else { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); } return false; } function change_key_case($arr) { return is_array($arr)?array_change_key_case($arr):$arr; } var $req_flist; /** * @return void * @desc checks if a connection exists if it does not it closes the connection * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. * All Rights Reserved.. * Contributor(s): ______________________________________.. */ function checkConnection(){ global $log; if(!isset($this->database)) { $this->println("TRANS creating new connection"); /* * $flist=get_included_files(); * foreach($flist as $key=>$value) * { * if(!strstr($value,'\\modules') && !strstr($value,'\\data')) * unset($flist[$key]); * } * $this->println($flist); */ $this->connect(false); } else { //$this->println("checkconnect using old connection"); } } /* ADODB converted * function query($sql, $dieOnError=false, $msg='') * { * $this->println("query ".$sql); * $this->log->info('Query:' . $sql); * $this->checkConnection(); * $this->query_time = microtime(); * if($this->dbType == "mysql") * { * $result =& mysql_query($sql); * $this->lastmysqlrow = -1; * } else { * $result =& $this->database->query($sql); * } * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function query($sql, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB query ".$sql); $log->debug('query being executed : '.$sql); $this->checkConnection(); $result = & $this->database->Execute($sql); $this->lastmysqlrow = -1; if(!$result)$this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); return $result; } function getEmptyBlob() { //if(dbType=="oci8") return 'empty_blob()'; //else return 'null'; return 'null'; } function updateBlob($tablename, $colname, $id, $data) { $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id); $this->checkConnection(); $result = $this->database->UpdateBlob($tablename, $colname, $data, $id); $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id." status=".$result); return $result; } function updateBlobFile($tablename, $colname, $id, $filename) { $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename); $this->checkConnection(); $result = $this->database->UpdateBlobFile($tablename, $colname, $filename, $id); $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename." status=".$result); return $result; } /* ADODB converted * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') * { * if($this->dbType == "mysql") * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); * $this->lastsql = $sql; * * $this->checkConnection(); * $this->query_time = microtime(); * $result =& $this->database->limitQuery($sql,$start, $count); * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count); $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count); $this->checkConnection(); $result =& $this->database->SelectLimit($sql,$count,$start); if(!$result) $this->checkError($msg.' Limit Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getOne($sql, $dieOnError=false, $msg='') * { * $this->log->info('Get One:' . $sql); * $this->checkConnection(); * if($this->dbType == "mysql"){ * $queryresult =& $this->query($sql, $dieOnError, $msg); * $result =& mysql_result($queryresult,0); * } else { * $result =& $this->database->getOne($sql); * } * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); $this->checkConnection(); $result =& $this->database->GetOne($sql); if(!$result) $this->checkError($msg.' Get one Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getFieldsArray(&$result) * { * $field_array = array(); * * if(! isset($result) || empty($result)) * { * return 0; * } * * if($this->dbType == "mysql") * { * $i = 0; * while ($i < mysql_num_fields($result)) * { * $meta = mysql_fetch_field($result, $i); * * if (!$meta) * { * return 0; * } * * array_push($field_array,$meta->name); * * $i++; * } * } * else * { * $arr = tableInfo($result); * foreach ($arr as $index=>$subarr) * { * array_push($field_array,$subarr['name']); * } * } * * return $field_array; * } */ function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); $field_array = array(); if(! isset($result) || empty($result)) { return 0; } $i = 0; $n = $result->FieldCount(); while ($i < $n) { $meta = $result->FetchField($i); if (!$meta) { return 0; } array_push($field_array,$meta->name); $i++; } //$this->println($field_array); return $field_array; } /* ADODB Converted * function getRowCount(&$result) * { * if(isset($result) && !empty($result)) * if($this->dbType == "mysql"){ * return mysql_numrows($result); * } else { * return $result->numRows(); * } * return 0; * } */ function getRowCount(&$result){ global $log; //$this->println("ADODB getRowCount"); if(isset($result) && !empty($result)) $rows= $result->RecordCount(); //$this->println("ADODB getRowCount rows=".$rows); //$log->debug('getRowCount rows= '.$rows); return $rows; } /* ADODB newly added. replacement for mysql_num_rows */ function num_rows(&$result) { return $this->getRowCount($result); } /* ADODB newly added. replacement form mysql_num_fields */ function num_fields(&$result) { return $result->FieldCount(); } /* ADODB newly added. replacement for mysql_fetch_array() */ function fetch_array(&$result) { if($result->EOF) { //$this->println("ADODB fetch_array return null"); return NULL; } return $this->change_key_case($result->FetchRow()); } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); //Commented strip_selected_tags and added to_html function for HTML tags vulnerability //$coldata = strip_selected_tags($rowdata[$col],'script'); $coldata = to_html($rowdata[$col]); //$this->println("ADODB query_result ". $coldata); return $coldata; } /* ADODB Converted * function getAffectedRowCount(&$result) * { * if($this->dbType == "mysql"){ * return mysql_affected_rows(); * } * else { * return $result->affectedRows(); * } * return 0; * } */ function getAffectedRowCount(&$result) { global $log; //$this->println("ADODB getAffectedRowCount"); $log->debug('getAffectedRowCount'); $rows =$this->database->Affected_Rows(); //$this->println("ADODB getAffectedRowCount rows=".rows); $log->debug('getAffectedRowCount rows = '.$rows); return $rows; } /* ADODB converted * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ * $result = $this->query($sql, $dieOnError, $msg); * * if($this->getRowCount($result ) == 1) * return to_html($result, $encode); * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); * return ''; * } */ function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); if($this->getRowCount($result ) == 1) return $result; $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } /* ADODB converted * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) * { * if(isset($result) && $rowNum < 0) * { * if($this->dbType == "mysql"){ * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); * } * if($this->dbType == "mysql"){ * if($this->getRowCount($result) > $rowNum){ * mysql_data_seek($result, $rowNum); * } * $this->lastmysqlrow = $rowNum; * * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); * if($encode) * return array_map('to_html', $row); * return $row; * } */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { //$this->println("ADODB fetchByAssoc ".$rowNum." fetch mode=".$adb->database->$ADODB_FETCH_MODE); if($result->EOF) { $this->println("ADODB fetchByAssoc return null"); return NULL; } if(isset($result) && $rowNum < 0) { $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); //$this->println("ADODB fetchByAssoc r< 0 isarray r=".is_array($row)." r1=".is_array($row[1])); //$this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); //$this->println("ADODB fetchByAssoc r< 0 not array r1=".$row[1]); return $row; } //$this->println("ADODB fetchByAssoc after if ".$rowNum); if($this->getRowCount($result) > $rowNum) { $result->Move($rowNum); } $this->lastmysqlrow = $rowNum; //srini - think about this $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); $this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); return $row; } /* ADODB converted * function getNextRow(&$result, $encode=true) * { * if(isset($result)){ * $row = $result->fetchRow(); * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * return null; * } */ function getNextRow(&$result, $encode=true){ global $log; //$this->println("ADODB getNextRow"); $log->info('getNextRow'); if(isset($result)){ $row = $this->change_key_case($result->FetchRow()); if($row && $encode&& is_array($row)) return array_map('to_html', $row); return $row; } return null; } function fetch_row(&$result, $encode=true) { return $this->getNextRow($result); } function field_name(&$result, $col) { return $result->FetchField($col); } function getQueryTime(){ return $this->query_time; } /* * function execute($stmt, $data, $dieOnError=false, $msg=''){ * $this->log->info('Executing:'.$stmt); * $this->checkConnection(); * $this->query_time = microtime(); * $prepared = $this->database->prepare($stmt); * $result = execute($stmt, $data); * $this->query_time = microtime() - $this->query_time; * //$this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); * return $result; * } */ /* adodb converted * function connect($dieOnError = false){ * $this->println("connect"); * global $dbconfigoption; * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); * @mysql_select_db($this->dbName) or die( "Unable to select database"); * if(!$this->database){ * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); * if($this->connection == false && $dbconfigoption['persistent'] == true){ * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; * } * } * } * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); * if($this->checkError('Could Not Connect:', $dieOnError)) * $this->log->info("connected to db"); * * } */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); /* * $driver='mysql'; * $server='srinivasan'; * $user='root'; * $password=''; * $database='vtigercrm3_2'; * * $this->database = ADONewConnection($driver); * * #$this->database->debug = true; * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); */ /* * $this->dbHostName="srinivasan:1521"; * $this->userName="vt4"; * $this->userPassword="vt4"; * $this->dbName="srini"; * $this->dbType="oci8"; */ if(!isset($this->dbType)) { $this->println("ADODB Connect : DBType not specified"); return; } $this->database = ADONewConnection($this->dbType); //$this->database->debug = true; $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName); $this->database->LogSQL($this->enableSQLlog); //$this->database->SetFetchMode(ADODB_FETCH_ASSOC); //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } /* * function PearDatabase(){ * //$this->println("PearDatabase"); * global $currentModule; * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); * $this->resetSettings(); * } * * function resetSettings(){ * global $dbconfig, $dbconfigoption; * $this->disconnect(); * $this->setDatabaseType($dbconfig['db_type']); * $this->setUserName($dbconfig['db_username']); * $this->setUserPassword($dbconfig['db_password']); * $this->setDatabaseHost( $dbconfig['db_hostname']); * $this->setDatabaseName($dbconfig['db_name']); * $this->dbOptions = $dbconfigoption; * $this->enableSQLlog = ($dbconfig['log_sql'] == true); * //$this->println("resetSettings log=".$this->enableSQLlog); * //$this->println($dbconfig); * //if($this->dbType != "mysql"){ * // require_once( 'DB.php' ); * //} * } */ function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); global $currentModule; $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); $this->resetSettings($dbtype,$host,$dbname,$username,$passwd); } function resetSettings($dbtype,$host,$dbname,$username,$passwd) { global $dbconfig, $dbconfigoption; if($host == '') { $this->disconnect(); $this->setDatabaseType($dbconfig['db_type']); $this->setUserName($dbconfig['db_username']); $this->setUserPassword($dbconfig['db_password']); $this->setDatabaseHost( $dbconfig['db_hostname']); $this->setDatabaseName($dbconfig['db_name']); $this->dbOptions = $dbconfigoption; if($dbconfig['log_sql']) $this->enableSQLlog = ($dbconfig['log_sql'] == true); //$this->println("resetSettings log=".$this->enableSQLlog); //$this->println($dbconfig); /*if($this->dbType != "mysql"){ require_once( 'DB.php' ); }*/ } else { $this->disconnect(); $this->setDatabaseType($dbtype); $this->setDatabaseName($dbname); $this->setUserName($username); $this->setUserPassword($passwd); $this->setDatabaseHost( $host); } } function quote($string){ return $this->database->qstr($string); } /* ADODB converted * function disconnect() { * $this->println("disconnect"); * if(isset($this->database)){ * if($this->dbType == "mysql"){ * mysql_close($this->database); * } else { * $this->database->disconnect(); * } * unset($this->database); * } * } */ function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ if($this->dbType == "mysql"){ mysql_close($this->database); } else { $this->database->disconnect(); } unset($this->database); } } function setDebug($value) { $this->database->debug = $value; } // ADODB newly added methods function createTables($schemaFile, $dbHostName=false, $userName=false, $userPassword=false, $dbName=false, $dbType=false) { $this->println("ADODB createTables ".$schemaFile); if($dbHostName!=false) $this->dbHostName=$dbHostName; if($userName!=false) $this->userName=$userPassword; if($userPassword!=false) $this->userPassword=$userPassword; if($dbName!=false) $this->dbName=$dbName; if($dbType!=false) $this->dbType=$dbType; //$db = ADONewConnection($this->dbType); $this->checkConnection(); $db = $this->database; //$db->debug = true; //$this->println("ADODB createTables connect status=".$db->Connect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName)); $schema = new adoSchema( $db ); //Debug Adodb XML Schema $sehema->XMLS_DEBUG = TRUE; //Debug Adodb $sehema->debug = true; $sql = $schema->ParseSchema( $schemaFile ); $this->println("--------------Starting the table creation------------------"); //$this->println($sql); //integer ExecuteSchema ([array $sqlArray = NULL], [boolean $continueOnErr = NULL]) $result = $schema->ExecuteSchema( $sql, true ); if($result) print $db->errorMsg(); // needs to return in a decent way $this->println("ADODB createTables ".$schemaFile." status=".$result); return $result; } function createTable($tablename, $flds) { $this->println("ADODB createTable table=".$tablename." flds=".$flds); $this->checkConnection(); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $dict = NewDataDictionary($this->database); $sqlarray = $dict->CreateTableSQL($tablename, $flds); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB createTable table=".$tablename." flds=".$flds." status=".$result); return $result; } function alterTable($tablename, $flds, $oper) { $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $this->checkConnection(); $dict = NewDataDictionary($this->database); //$sqlarray = new Array(); if($oper == 'Add_Column') { $sqlarray = $dict->AddColumnSQL($tablename, $flds); } else if($oper == 'Delete_Column') { $sqlarray = $dict->DropColumnSQL($tablename, $flds); } $this->println("sqlarray"); $this->println($sqlarray); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper." status=".$result); return $result; } function getColumnNames($tablename) { $this->println("ADODB getColumnNames table=".$tablename); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); //$colNames = new Array(); $i=0; foreach($adoflds as $fld) { $colNames[$i] = $fld->name; $i++; } return $colNames; } function formatString($tablename,$fldname, $str) { //$this->println("ADODB formatString table=".$tablename." fldname=".$fldname." str=".$str); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); foreach ( $adoflds as $fld ) { //$this->println("ADODB formatString adofld =".$fld->name); if(strcasecmp($fld->name,$fldname)==0) { //$this->println("ADODB formatString fldname=".$fldname." fldtype =".$fld->type); $fldtype =strtoupper($fld->type); if(strcmp($fldtype,'CHAR')==0 || strcmp($fldtype,'VARCHAR') == 0 || strcmp($fldtype,'VARCHAR2') == 0 || strcmp($fldtype,'LONGTEXT')==0 || strcmp($fldtype,'TEXT')==0) { //$this->println("ADODB return else normal"); return $this->database->Quote($str); } else if(strcmp($fldtype,'DATE') ==0 || strcmp($fldtype,'TIMESTAMP')==0) { return $this->formatDate($str); } else { return $str; } } } $this->println("format String Illegal field name ".$fldname); return $str; } function formatDate($datetime) { $this->checkConnection(); //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); //if($db->dbType=='mysql') return $this->quote($date); return $date; } function getDBDateString($datecolname) { $this->checkConnection(); $db = &$this->database; $datestr = $db->SQLDate("Y-m-d, H:i:s" ,$datecolname); return $datestr; } function getUniqueID($seqname) { global $log; $this->checkConnection(); if( $this->dbType == "pgsql") { $keytab = $this->database->MetaPrimaryKeys($seqname); if( count( $keytab) > 0) { $log->info("PearDatabase: Postgres getUniqueID hack: ".$seqname."_".$keytab[0]."_seq"); return $this->database->GenID($seqname."_".$keytab[0]."_seq",1); } else { $log->info("PearDatabase: Problem: getUniqueID but no key for '$seqname'"); } } return $this->database->GenID($seqname."_seq",1); } function get_tables() { $this->checkConnection(); $result = & $this->database->MetaTables('TABLES'); $this->println($result); return $result; } } /* End of class */ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); ?> From dome at tel.co.th Thu May 3 10:40:59 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 21:40:59 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503155634.A11877@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> <20070503155634.A11877@Strawberry.COM> Message-ID: <8ccbff060705030740u1f6df32cjd133c656035acfe8@mail.gmail.com> Same problem. when create contact Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 When create new note Warning: mktime() expects parameter 6 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1388 Warning: mktime() expects parameter 1 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1389 Setting->orgunit Fatal error: Call to undefined method OrgUnit::getListQuery() in /opt/lampp/htdocs/vtiger/include/utils/ListViewUtils.php on line 2388 Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi, > > I've verfied the 5.1_jens PearDatabase.php to my running version > and found no differences. Could you please check the one attached to > this mail to the one you're testing against? > > Kind regards, > Jens Hamisch > > On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > > Jens, > > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > > found same error > > Fatal error: Call to a member function Move() on a non-object in > > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > > > Please give me more information about php,postgresql version ? > > > > Dome C. > > > > On 5/3/07, Jens Hamisch wrote: > > > > > > Hi Enrico, > > > > > > my fixes adress syntactical postgres support only. However > > > yours also seems to improove performance. Is there any chance > > > to have both fixes implemented (@don,richie)? > > > > > > Jens > > > > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > > > > > > Hi, > > > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > > you doing instead of using the query_results method? > > > > > > > > As already said: introduced some new functions, which fetch either > > > > one record (run_query_record() and run_query_field()) or all records > > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > > > There are several result types: > > > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > > --> returns an scalar > > > > b) just one record: -> run_query_record($query) > > > > --> returns an associative array > > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > > --> returns an array/list of scalars > > > > d) an list of records: -> run_query_allreords($query) > > > > --> returns an array/list of ass. arrays > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > From weigelt at metux.de Thu May 3 12:24:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:24:44 +0200 Subject: [Vtigercrm-developers] [PATCH] new functions and some cleanups Message-ID: <20070503162443.GA22625@nibiru.local> Hi folks, here are some patches (against latest trunk), which introduce the new functions and so some cleanups. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- ## ## takes db_port directly from the request variable, since register_globals ## is disabled most times and deprecated. ## diff -ruN upstream-10823/install/4createConfigFile.php working/install/4createConfigFile.php --- upstream-10823/install/4createConfigFile.php 2007-05-03 17:42:54.000000000 +0200 +++ working/install/4createConfigFile.php 2007-05-03 17:53:31.000000000 +0200 @@ -58,11 +58,14 @@ else { $db_hostname = $_REQUEST['db_hostname']; - if($db_type == "pgsql") - $db_port = '5432'; - else - $db_port = '3306'; - } + switch($_REQUEST{'db_type'}) + { + case 'pgsql': $db_port = '5432'; break; + case 'mysql': $db_port = '3306'; break; + default: + throw new Exception("unsupported db_type: \""+$_REQUEST{'db_type'}."\""); + } + } } if (isset($_REQUEST['db_username']))$db_username = $_REQUEST['db_username']; ## ## fixes error w/ duplicated class definitions. not sure if this is really correct ;-O ## diff -ruN upstream-10823/modules/Calendar/Date.php working/modules/Calendar/Date.php --- upstream-10823/modules/Calendar/Date.php 2007-05-03 17:43:39.000000000 +0200 +++ working/modules/Calendar/Date.php 2007-05-03 17:53:31.000000000 +0200 @@ -9,7 +9,7 @@ * ********************************************************************************/ -class DateTime +class X_DateTime { var $second = '00'; var $minute = '00'; -------------- next part -------------- ## ## adds new functions to the PearDatabase class to come around the whole ## broken query_result() idea ;-O ## diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 17:50:00.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:10:05.000000000 +0200 @@ -433,6 +433,144 @@ } return $this->change_key_case($result->FetchRow()); } + function run_query_record_html($query) + { + if (!is_array($rec = $this->run_query_record($query))) +// throw new Exception("no rec: $query"); + return $rec; + + foreach ($rec as $walk => $cur) + $r[$walk] = to_html($cur); + + return $r; + } + + function sql_quote($data) + { + if (is_array($data)) + { + switch($data{'type'}) + { + case 'text': + case 'numeric': + case 'integer': + case 'oid': + return $this->quote($data{'value'}); + break; + case 'timestamp': + return $this->formatDate($data{'value'}); + break; + default: + throw new Exception("unhandled type: ".serialize($cur)); + } + } + else + return $this->quote($data); + } + + function sql_insert_data($table, $data) + { + if (!$table) + throw new Exception("missing table name"); + if (!is_array($data)) + throw new Exception("data must be an array"); + if (!count($table)) + throw new Exception("no data given"); + + $sql_fields = ''; + $sql_data = ''; + foreach($data as $walk => $cur) + { + $sql_fields .= ($sql_fields?',':'').$walk; + $sql_data .= ($sql_data?',':'').$this->sql_quote($cur); + } + + return 'INSERT INTO '.$table.' ('.$sql_fields.') VALUES ('.$sql_data.')'; + } + + function run_insert_data($table,$data) + { + $query = $this->sql_insert_data($table,$data); + $res = $this->query($query); + $this->query("commit;"); + } + + function run_query_record($query) + { + $result = $this->query($query); + if (!$result) + return; +// throw new Exception("empty result !"); + + if (!is_object($result)) + throw new Exception("query \"$query\" failed: ".serialize($result)); + $res = $result->FetchRow(); + $rowdata = $this->change_key_case($res); + return $rowdata; + } + + function run_query_allrecords($query) + { + $result = $this->query($query); + $records = array(); + $sz = $this->num_rows($result); + for ($i=0; $i<$sz; $i++) + $records[$i] = $this->change_key_case($result->FetchRow()); + return $records; + } + + function run_query_field($query,$field) + { + $rowdata = $this->run_query_record($query); + return $rowdata{$field}; + } + + function run_query_list($query,$field) + { + $records = $this->run_query_allrecords($query); + foreach($records as $walk => $cur) + $list[] = $cur{$field}; + } + + function run_query_field_html($query,$field) + { + return to_html($this->run_query_field($query,$field)); + } + + function result_get_next_record($result) + { + return $this->change_key_case($result->FetchRow()); + } + + // create an IN expression from an array/list + function sql_expr_datalist($a) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur); + + return ' ( '.$l.' ) '; + } + + // create an IN expression from an record list, take $field within each record + function sql_expr_datalist_from_records($a,$field) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!$field) + throw new Exception("missing field"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur{$field}); + + return ' ( '.$l.' ) '; + } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) -------------- next part -------------- diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 18:13:24.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:17:22.000000000 +0200 @@ -104,46 +104,6 @@ $this->println("TRANS Completed"); } -/* ADODB converted - * function checkError($msg='', $dieOnError=false) - * { - * if($this->dbType == "mysql") - * { - * if (mysql_errno()) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); - * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); - * } else { - * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); - * } - * return true; - * } - * return false; - * } - * else - * { - * if(!isset($this->database)) - * { - * $this->log->error("Database Is Not Connected"); - * return true; - * } - * if(DB::isError($this->database)) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal($msg.$this->database->getMessage()); - * die ($msg.$this->database->getMessage()); - * } else { - * $this->log->error($msg.$this->database->getMessage()); - * } - * return true; - * } - * } - * return false; - * } - */ function checkError($msg='', $dieOnError=false) { @@ -160,7 +120,7 @@ * return true; * } */ - + if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); @@ -268,24 +228,6 @@ return $result; } -/* ADODB converted - * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') - * { - * if($this->dbType == "mysql") - * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); - * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); - * $this->lastsql = $sql; - * - * $this->checkConnection(); - * $this->query_time = microtime(); - * $result =& $this->database->limitQuery($sql,$start, $count); - * $this->query_time = microtime() - $this->query_time; - * $this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; @@ -297,22 +239,6 @@ return $result; } -/* ADODB converted - * function getOne($sql, $dieOnError=false, $msg='') - * { - * $this->log->info('Get One:' . $sql); - * $this->checkConnection(); - * if($this->dbType == "mysql"){ - * $queryresult =& $this->query($sql, $dieOnError, $msg); - * $result =& mysql_result($queryresult,0); - * } else { - * $result =& $this->database->getOne($sql); - * } - * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); @@ -322,46 +248,6 @@ return $result; } -/* ADODB converted - * function getFieldsArray(&$result) - * { - * $field_array = array(); - * - * if(! isset($result) || empty($result)) - * { - * return 0; - * } - * - * if($this->dbType == "mysql") - * { - * $i = 0; - * while ($i < mysql_num_fields($result)) - * { - * $meta = mysql_fetch_field($result, $i); - * - * if (!$meta) - * { - * return 0; - * } - * - * array_push($field_array,$meta->name); - * - * $i++; - * } - * } - * else - * { - * $arr = tableInfo($result); - * foreach ($arr as $index=>$subarr) - * { - * array_push($field_array,$subarr['name']); - * } - * } - * - * return $field_array; - * } - */ - function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); @@ -586,19 +472,6 @@ return $coldata; } -/* ADODB Converted - * function getAffectedRowCount(&$result) - * { - * if($this->dbType == "mysql"){ - * return mysql_affected_rows(); - * } - * else { - * return $result->affectedRows(); - * } - * return 0; - * } - */ - function getAffectedRowCount(&$result) { global $log; @@ -610,17 +483,6 @@ return $rows; } -/* ADODB converted - * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ - * $result = $this->query($sql, $dieOnError, $msg); - * - * if($this->getRowCount($result ) == 1) - * return to_html($result, $encode); - * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); - * return ''; - * } - */ - function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); @@ -630,40 +492,6 @@ $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } - - -/* ADODB converted - * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) - * { - * if(isset($result) && $rowNum < 0) - * { - * if($this->dbType == "mysql"){ - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); - * } - * if($this->dbType == "mysql"){ - * if($this->getRowCount($result) > $rowNum){ - * mysql_data_seek($result, $rowNum); - * } - * $this->lastmysqlrow = $rowNum; - * - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); - * if($encode) - * return array_map('to_html', $row); - * return $row; - * } - */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { @@ -703,20 +531,7 @@ return array_map('to_html', $row); return $row; } - -/* ADODB converted - * function getNextRow(&$result, $encode=true) - * { - * if(isset($result)){ - * $row = $result->fetchRow(); - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * return null; - * } - */ - + function getNextRow(&$result, $encode=true){ global $log; @@ -744,69 +559,12 @@ function getQueryTime(){ return $this->query_time; } - -/* - * function execute($stmt, $data, $dieOnError=false, $msg=''){ - * $this->log->info('Executing:'.$stmt); - * $this->checkConnection(); - * $this->query_time = microtime(); - * $prepared = $this->database->prepare($stmt); - * $result = execute($stmt, $data); - * $this->query_time = microtime() - $this->query_time; - * //$this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); - * return $result; - * } - */ - - -/* adodb converted - * function connect($dieOnError = false){ - * $this->println("connect"); - * global $dbconfigoption; - * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ - * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); - * @mysql_select_db($this->dbName) or die( "Unable to select database"); - * if(!$this->database){ - * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); - * if($this->connection == false && $dbconfigoption['persistent'] == true){ - * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; - * } - * } - * } - * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); - * if($this->checkError('Could Not Connect:', $dieOnError)) - * $this->log->info("connected to db"); - * - * } - */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); - -/* - * $driver='mysql'; - * $server='srinivasan'; - * $user='root'; - * $password=''; - * $database='vtigercrm3_2'; - * - * $this->database = ADONewConnection($driver); - * - * #$this->database->debug = true; - * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); - */ - -/* - * $this->dbHostName="srinivasan:1521"; - * $this->userName="vt4"; - * $this->userPassword="vt4"; - * $this->dbName="srini"; - * $this->dbType="oci8"; - */ if(!isset($this->dbType)) { @@ -823,32 +581,6 @@ //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } -/* - * function PearDatabase(){ - * //$this->println("PearDatabase"); - * global $currentModule; - * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); - * $this->resetSettings(); - * } - * - * function resetSettings(){ - * global $dbconfig, $dbconfigoption; - * $this->disconnect(); - * $this->setDatabaseType($dbconfig['db_type']); - * $this->setUserName($dbconfig['db_username']); - * $this->setUserPassword($dbconfig['db_password']); - * $this->setDatabaseHost( $dbconfig['db_hostname']); - * $this->setDatabaseName($dbconfig['db_name']); - * $this->dbOptions = $dbconfigoption; - * $this->enableSQLlog = ($dbconfig['log_sql'] == true); - * //$this->println("resetSettings log=".$this->enableSQLlog); - * //$this->println($dbconfig); - * //if($this->dbType != "mysql"){ - * // require_once( 'DB.php' ); - * //} - * } - */ - function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); @@ -893,21 +625,6 @@ return $this->database->qstr($string); } - -/* ADODB converted - * function disconnect() { - * $this->println("disconnect"); - * if(isset($this->database)){ - * if($this->dbType == "mysql"){ - * mysql_close($this->database); - * } else { - * $this->database->disconnect(); - * } - * unset($this->database); - * } - * } - */ - function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ @@ -1054,7 +771,6 @@ //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); - //if($db->dbType=='mysql') return $this->quote($date); return $date; } @@ -1083,6 +799,3 @@ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); - - -?> From weigelt at metux.de Thu May 3 12:33:22 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:33:22 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <20070503163322.GB22625@nibiru.local> * Jens Hamisch schrieb: Hi Enrico, > my fixes adress syntactical postgres support only. I'll have a look at it. Could you please give me some quick cmdline to fetch it (I'm not really experienced w/ svn) or an patch against latest release or trunk ? > However yours also seems to improove performance. Is there any > chance to have both fixes implemented (@don,richie) ? Well, let's try it step by step :) I've posted a first set of patches some mins ago. They should not break anything, just add the new functions and clean up old comments, etc. Would be great if you could check them if they fit your branch. IMHO they should be good enough to get into upstream quickly. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Thu May 3 12:48:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:48:09 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... Message-ID: <20070503164809.GA13215@nibiru.local> Hi folks, I've got lots of cases where PHP spits out an error message like: "Catchable fatal error: Object of class Accounts could not be converted to string in ....." This is triggered by the $log->debug() calls at the head of many functions, where an log message is cat'ed from the parameters. Obviously PHP does not know what to do with objects if they should be accessed as strings. No idea if there's an option for controlling that or whether it depends on the PHP version. For now I simply comment out these lines at my site, but that's proably not the solution. How can we cope with these cases ? Write an generic ObjToString() function which handles that (checks if its an object and then prints proper info, etc) or add an toString() method to all classes ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Thu May 3 14:03:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Thu, 03 May 2007 20:03:14 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... In-Reply-To: <20070503164809.GA13215@nibiru.local> References: <20070503164809.GA13215@nibiru.local> Message-ID: <463A23E2.9000603@tsolucio.com> Hi, All entities (except Users) inherit from crmentity, so what I do is add the toString function in data/crmentity.php to avoid the error. Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > I've got lots of cases where PHP spits out an error message like: > > "Catchable fatal error: Object of class Accounts could not > be converted to string in ....." > > This is triggered by the $log->debug() calls at the head of many > functions, where an log message is cat'ed from the parameters. > Obviously PHP does not know what to do with objects if they > should be accessed as strings. No idea if there's an option for > controlling that or whether it depends on the PHP version. > > For now I simply comment out these lines at my site, but that's > proably not the solution. > > How can we cope with these cases ? > > Write an generic ObjToString() function which handles that > (checks if its an object and then prints proper info, etc) > or add an toString() method to all classes ? > > > cu > From weigelt at metux.de Fri May 4 10:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 4 May 2007 16:47:48 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! Message-ID: <20070504144747.GB14102@nibiru.local> Hi folks, I'm currently trying out the 5.1_jens branch. It seems really broken :(( a) I had to add __toString() methods to certain objects b) The getOrgUnits() function is missing. I couldn't find anything about it on the web. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Sat May 5 14:28:16 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Sat, 5 May 2007 20:28:16 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070504144747.GB14102@nibiru.local>; from Enrico Weigelt on Fri, May 04, 2007 at 04:47:48PM +0200 References: <20070504144747.GB14102@nibiru.local> Message-ID: <20070505202816.A19389@Strawberry.COM> Hi, I'm going to have a look at this. The branch is just a copy of the definitely productive version I'm running here. Is there any limit on your (personal) mailbox? I may send an TAR archive to you ... Jens On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I'm currently trying out the 5.1_jens branch. > It seems really broken :(( > > a) I had to add __toString() methods to certain objects > > b) The getOrgUnits() function is missing. I couldn't find anything > about it on the web. > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Sat May 5 17:11:07 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Sun, 6 May 2007 04:11:07 +0700 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <8ccbff060705051411s2f06c50aufa1549505a3f018e@mail.gmail.com> send me please dome at tel.co.th Thanks Dome C. On 5/6/07, Jens Hamisch wrote: > > Hi, > > > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... > > > Jens > > > On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > > > Hi folks, > > > > > > I'm currently trying out the 5.1_jens branch. > > It seems really broken :(( > > > > a) I had to add __toString() methods to certain objects > > > > b) The getOrgUnits() function is missing. I couldn't find anything > > about it on the web. > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From weigelt at metux.de Sun May 6 11:54:04 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Sun, 6 May 2007 17:54:04 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <20070506155404.GA18277@nibiru.local> * Jens Hamisch schrieb: Hi, > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... Okay, go ahead :) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 08:57:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 14:57:28 +0200 Subject: [Vtigercrm-developers] 1/2 OT: diff + skip files Message-ID: <20070507125728.GA999@nibiru.local> Hi folks, could anyone give me an tip how to skip certain files on diff ? I'm currently merging jens' personal copy with the 5.1_jens branch from SVN and there are lots of autogenerated files, which should be skipped (to reduce manual work on the diffs). cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 09:01:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 15:01:49 +0200 Subject: [Vtigercrm-developers] jens' tree vs 5.1_jens Message-ID: <20070507130149.GB999@nibiru.local> Hi folks, Jens has sent me his personal tree (which he considered stable). There're a lot of differences to the 5.1_jens branch in SVN. I'm currently working on merging his changes and putting them into a couple of patch files. Would be great if they'd go into SVN very soon. In the next step we should merge this branch with the current trunk. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 14:00:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 20:00:41 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount Message-ID: <20070508180041.GA4205@nibiru.local> Hi folks, while just filing an invoice, I got into big trouble: It refuses non-integer amounts ! For service billing this is really bad. You can't assume, all works are done in an hourly raster. How can I fix this ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Tue May 8 14:47:20 2007 From: joe at tsolucio.com (Joe Bordes) Date: Tue, 08 May 2007 20:47:20 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <20070508180041.GA4205@nibiru.local> References: <20070508180041.GA4205@nibiru.local> Message-ID: <4640C5B8.2010601@tsolucio.com> Hi, Look in the forums/wiki, it has something to do with changing the type of a field in vtiger_inventoryproductrel Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > while just filing an invoice, I got into big trouble: > It refuses non-integer amounts ! > > For service billing this is really bad. You can't assume, all > works are done in an hourly raster. > > How can I fix this ? > > > cu > From weigelt at metux.de Tue May 8 15:01:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:01:07 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <4640C5B8.2010601@tsolucio.com> References: <20070508180041.GA4205@nibiru.local> <4640C5B8.2010601@tsolucio.com> Message-ID: <20070508190106.GA17322@nibiru.local> * Joe Bordes schrieb: Hi, > Look in the forums/wiki, it has something to do with changing > the type of a field in vtiger_inventoryproductrel why the hell the quantity an int instead of numeric ?! In which places do I have to change it to fix it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:34:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:34:33 +0200 Subject: [Vtigercrm-developers] RFC: schema versioning Message-ID: <20070508193433.GB17322@nibiru.local> Hi folks, as some of you probably might have realized that upgrading database schema is an very tricky issue. I don't believe that an universal schema generator and updater, which really *WORKS* can be built with reasonable effort, at least not if the RDBMS should not just be abused as spreadsheet storage. The various RDBMS'es *are* different and so require different schemata. The big problem is not writing proper SQL commands, but keeping track of current schema version and find the right commands for update. So my suggestion: * add an new table "schema_version" which contains an list of schema components (identified by some unique name) and their current version (which is an sequential number). * schema updates are done, for each component separately, strictly sequential. each RDBMS has its own SQL scripts. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:41:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:41:33 +0200 Subject: [Vtigercrm-developers] [BUG] Invoice: Disturbing noise when w/ multiple articles of same type Message-ID: <20070508194133.GC17322@nibiru.local> Hi folks, why does it give this disturbing noise when putting multiple artiles of the same type on one invoice ? For services this is really ugly. Obviously you don't have an separate product for every little piece you've done for the customer. The article is simply working time, amount of "1" means 1 hour ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:48:03 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:48:03 +0200 Subject: [Vtigercrm-developers] Requesting trac access Message-ID: <20070508194803.GD17322@nibiru.local> Hi folks, as I'm currenly discovering lots of bugs, I'd like to get trac access to file them there. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:52:46 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:52:46 +0200 Subject: [Vtigercrm-developers] [BUG] cannot change my company name Message-ID: <20070508195245.GE17322@nibiru.local> Hi folks, I cannot change my company name. No matter what I do, it remains "vtiger". How can I get this fixed ASAP ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 16:25:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 22:25:20 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! Message-ID: <20070508202520.GF17322@nibiru.local> This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gharris at teamexpansion.org Tue May 8 16:41:06 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 16:41:06 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> Message-ID: Who in the world are you and why are you cursing all over the place!!!! Thanks, Greg Harris ---------- Original Message ---------- FROM: Enrico Weigelt TO: vtiger support DATE: Tue, 8 May 2007 22:25:20 +0200 SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From jorge.torres.maldonado at gmail.com Tue May 8 16:49:54 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 8 May 2007 16:49:54 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: References: <20070508202520.GF17322@nibiru.local> Message-ID: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Hi, I believe BUG reporting is very important, no matter who in planet one may be. Cheers, On 5/8/07, Greg Harris wrote: > > Who in the world are you and why are you cursing all over the place!!!! > > Thanks, > > Greg Harris > > > > ---------- Original Message ---------- > > FROM: Enrico Weigelt > TO: vtiger support > DATE: Tue, 8 May 2007 22:25:20 +0200 > > SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! > > > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/d8b9195b/attachment-0001.html From gharris at teamexpansion.org Tue May 8 17:13:00 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 17:13:00 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/a8cdeb4d/attachment-0003.html From tzenk at gmx.net Tue May 8 18:40:10 2007 From: tzenk at gmx.net (Torsten Zenk) Date: Wed, 09 May 2007 00:40:10 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> References: <20070508202520.GF17322@nibiru.local> Message-ID: <4640FC4A.1050703@gmx.net> Yeah, Bug reporting in a neutral way is very important, but we don?t need any personal emotions in a bug report, so wether it is ...what the hell....or it is.....who are you...just report and keep your emotions for the forum and your wife ;) Torsten Enrico Weigelt schrieb: > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > From gopals at vtiger.com Tue May 8 22:20:11 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 09 May 2007 07:50:11 +0530 Subject: [Vtigercrm-developers] Requesting trac access In-Reply-To: <20070508194803.GD17322@nibiru.local> References: <20070508194803.GD17322@nibiru.local> Message-ID: <46412FDB.9080001@vtiger.com> Hi, I've enabled trac access for you. Shortly you will receive login details in a separate mail. URL: http://vtiger.fosslabs.com Regards, Gopal Enrico Weigelt wrote: > Hi folks, > > as I'm currenly discovering lots of bugs, I'd like to get trac > access to file them there. > > cu > From weigelt at metux.de Wed May 9 07:27:30 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:27:30 +0200 Subject: [Vtigercrm-developers] RFC: add function getCurrentOrgDetails() Message-ID: <20070509112730.GA16156@nibiru.local> Hi folks, there are several points where the information of the current organisation is retrieved on pedestrian ways (several SQL queries, object creations, etc). Such things are an good place for bugs, so we should reduce them as much as possible. So I suggest introducing an new function "getEntityOrgDetails()", which retrieves that information by the given $crmid. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:28:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:28:41 +0200 Subject: [Vtigercrm-developers] TeX printing Message-ID: <20070509112841.GB16156@nibiru.local> Hi folks, is anyone working on TeX based printing (ie. Invoices) ? Otherwise I'll take care of it. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:42:40 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:42:40 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org Message-ID: <20070509114240.GC16156@nibiru.local> Hi folks, could anyone please explain what the table vtiger_entity2org actually is for ? As far as I understood it, we map the entities (ie. users are entities ?) to the organisation. Now I wonder if an entity can be associated to more than one organisation. If not, it's trivial to move that information directly to the entity's record and skip (maybe drop) this table. BTW: AFAIK we use the org's *NAME* here, not the (numerical) ID or some unique ident. That's a really bad idea, ie. makes changing the org name very, very complicated. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 08:06:21 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:06:21 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509112841.GB16156@nibiru.local> References: <20070509112841.GB16156@nibiru.local> Message-ID: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> I was thinking more about a wiki style On 5/9/07, Enrico Weigelt wrote: > > > Hi folks, > > > is anyone working on TeX based printing (ie. Invoices) ? > Otherwise I'll take care of it. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/18ddd9ce/attachment-0003.html From weigelt at metux.de Wed May 9 08:12:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 14:12:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> Message-ID: <20070509121210.GA28731@nibiru.local> * Jorge Torres schrieb: > I was thinking more about a wiki style How can it assist in rendering high quality preprints ? Is there any good rendering engine for this out there we can use ? The wiki syntax is good for easy editing of hypertext, but driving an print from db content is an completely different issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 08:49:32 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:49:32 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509121210.GA28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> Message-ID: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Enrico, You are right, latex is about high quality prints, still you have to make a document class for what you want and so on, and I dont know a way about extracting db content from latex, I thought that (extracting db contents) could be easier achieved in a wiki syntax way, and precisely because of wiki's "easy-fast editing" it would be perfect for end user applications. Also wiki to xml shouldn't be that complicated, having data in XML; a XSL template can be very simple to describe (much more easier than latex class), there are xsl "rendering" functions for php; the result of xsl(xml) could be html, so you can either send it to the web browser or you can "html to pdf" which is straight forward in php. What do you think? On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > I was thinking more about a wiki style > > How can it assist in rendering high quality preprints ? > Is there any good rendering engine for this out there we can use ? > > The wiki syntax is good for easy editing of hypertext, but driving > an print from db content is an completely different issue. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/85d38641/attachment-0001.html From jorge.torres.maldonado at gmail.com Wed May 9 09:00:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:00:24 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Message-ID: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Enrico, Wait, Now that I think about it, it would be easier to just have vtiger to outputs a printing configuration form in which one textarea has an xml data structure of information that wants to be printed (say "invoice"), then another textarea for your xsl. If so; the only thing one should do, is to describe a xsl template for that xml structure, save, and that's it, next time you want to print, what vtiger would do is to "render" that information, as explained in my last email. Cheers, Jorge On 5/9/07, Jorge Torres wrote: > > Enrico, > > You are right, latex is about high quality prints, still you have to make > a document class for what you want and so on, and I dont know a way about > extracting db content from latex, I thought that (extracting db contents) > could be easier achieved in a wiki syntax way, and precisely because of > wiki's "easy-fast editing" it would be perfect for end user applications. > Also wiki to xml shouldn't be that complicated, having data in XML; a XSL > template can be very simple to describe (much more easier than latex class), > there are xsl "rendering" functions for php; the result of xsl(xml) could be > html, so you can either send it to the web browser or you can "html to pdf" > which is straight forward in php. > > What do you think? > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > I was thinking more about a wiki style > > > > How can it assist in rendering high quality preprints ? > > Is there any good rendering engine for this out there we can use ? > > > > The wiki syntax is good for easy editing of hypertext, but driving > > an print from db content is an completely different issue. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/d40f8d56/attachment-0003.html From weigelt at metux.de Wed May 9 09:35:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:35:44 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <20070509133544.GC28731@nibiru.local> * Jorge Torres schrieb: Hi, > Wait, Now that I think about it, it would be easier to just > have vtiger to outputs a printing configuration form in which > one textarea has an xml data structure of information that > wants to be printed (say "invoice"), then another textarea > for your xsl. If so; the only thing one should do, is to > describe a xsl template for that xml structure, save, and > that's it, next time you want to print, what vtiger would > do is to "render" that information, as explained in my last email. Again, very complicated for user and coder. Why not just an option in the settings screen, where the user can select renderer and template, and maybe an additional template editing form ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 09:39:42 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 15:39:42 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509114240.GC16156@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 01:42:40PM +0200 References: <20070509114240.GC16156@nibiru.local> Message-ID: <20070509153942.B3824@Strawberry.COM> Hi, it can be assigned to more than one organization. There is a 'primary' column in the entity2org table which defines the primary organization - the one that really 'owns' the entity. Jens On Wed, May 09, 2007 at 01:42:40PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > could anyone please explain what the table vtiger_entity2org > actually is for ? > > As far as I understood it, we map the entities (ie. users are > entities ?) to the organisation. > > Now I wonder if an entity can be associated to more than one > organisation. If not, it's trivial to move that information > directly to the entity's record and skip (maybe drop) this table. > > > BTW: AFAIK we use the org's *NAME* here, not the (numerical) > ID or some unique ident. That's a really bad idea, ie. makes > changing the org name very, very complicated. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 09:44:00 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 15:44:00 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <4641D020.60605@tsolucio.com> Hi, Why not use the merge system that is already in vtiger? I have enhanced the merge system based on forum code and I have added merge to SO very easily. Now my client can create word, openoffice or RTF documents using their favorite document processor as if they made any other template. What advantage is there in TeX? Joe TSolucio Jorge Torres escribi?: > Enrico, From weigelt at metux.de Wed May 9 09:45:37 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:45:37 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509153942.B3824@Strawberry.COM> References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> Message-ID: <20070509134537.GD28731@nibiru.local> * Jens Hamisch schrieb: Hi, > it can be assigned to more than one organization. > There is a 'primary' column in the entity2org table which defines the > primary organization - the one that really 'owns' the entity. hmm, meanwhile I've found some pieces of code (in the invoice module) which explicitly break if the we have more than one org per entity (AFAIK). So what's correct now ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 09:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:47:48 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <20070509134748.GE28731@nibiru.local> * Joe Bordes schrieb: Hi, > Why not use the merge system that is already in vtiger? Well, actually, I never heared about that. > What advantage is there in TeX? High quality preprints ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 09:49:45 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:49:45 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Sounds great, but i dont get how is it that you get DB info from client's, word, openoffice. Thanks, Jorge On 5/9/07, Joe Bordes wrote: > > Hi, > > Why not use the merge system that is already in vtiger? > I have enhanced the merge system based on forum code and I have added > merge to SO very easily. Now my client can create word, openoffice or > RTF documents using their favorite document processor as if they made > any other template. > What advantage is there in TeX? > > Joe > TSolucio > > Jorge Torres escribi?: > > Enrico, > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/850e0d7c/attachment-0001.html From jens at Strawberry.COM Wed May 9 10:00:11 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 16:00:11 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509134537.GD28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 03:45:37PM +0200 References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> <20070509134537.GD28731@nibiru.local> Message-ID: <20070509160011.E3824@Strawberry.COM> Hi, do you have some more detailed information on that? Could be either a bug or something missed in the port of my changes to 5.0.3. Jens On Wed, May 09, 2007 at 03:45:37PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > it can be assigned to more than one organization. > > There is a 'primary' column in the entity2org table which defines the > > primary organization - the one that really 'owns' the entity. > > hmm, meanwhile I've found some pieces of code (in the invoice module) > which explicitly break if the we have more than one org per > entity (AFAIK). > > So what's correct now ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 10:02:21 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:02:21 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Message-ID: <20070509140221.GF28731@nibiru.local> * Jorge Torres schrieb: Hi, > Sounds great, but i dont get how is it that you get DB info > from client's, word, openoffice. Are we still talking about the same thing ? I'm working on invoice pdf rendering, which is entirely done on the server. Other formats, ie. OO could be generated the same way. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 10:16:48 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 10:16:48 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Enrico, Yes, from I want it to do it from server side. It seems that I don't get what this merge system does, I understood from Jen's suggestion: that users could work their templates at client side, is this correct?, if so, how would they get DB data or data content structure from clients editor. Rendering setup Option in settings screen as Enrico mentioned would be perfect. On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > Sounds great, but i dont get how is it that you get DB info > > from client's, word, openoffice. > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/c1f5479b/attachment-0002.html From weigelt at metux.de Wed May 9 10:23:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:23:28 +0200 Subject: [Vtigercrm-developers] organization ident Message-ID: <20070509142328.GH28731@nibiru.local> Hi folks, I've found an big-fat problem with the organization modeling in the DB: The org is always referenced by its name ! To be clear: its the *printable* name, which appears for example on the bill. So now it's clear, why it cannot be changed in the settings ;-O It appears the name is also abused as ident, which is the key problem. There's no additional ID here. To fix this, we have two options: a) Add an numerical ID to the organization table and fix all the schema to reference on that. This would probably be the most clean model, but requires much care on schema updates. b) Add an new text field (ie. "official_name") which now carries the actual *name* (ie. for printing on the invoice) and leave evrything else untouched. Nearly trivial to implement, but maybe not very clean design. Comments ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 10:33:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:33:35 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Message-ID: <20070509143335.GI28731@nibiru.local> * Jorge Torres schrieb: > if so, how would they get DB data or data content structure > from clients editor. Simply add some new button which calls the invoice rendering with an different engine / output format ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 10:59:10 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 16:59:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <4641E1BE.80207@tsolucio.com> Yes, we are still talking about the same thing. Please take a look at the existng merge system for accounts. The idea is that you open up OO and write the template, where you want the contact name (for example) you put CONTACT_NAME and this gets substituted dynamically when you choose the template and the contact. If we add this feature to invoice, you could write your invoice in word and use INVOICE_NUMBER or INVOICE_DATE for example. That is basically what I have working. Joe TSolucio Enrico Weigelt escribi?: > * Jorge Torres schrieb: > > Hi, > > >> Sounds great, but i dont get how is it that you get DB info >> from client's, word, openoffice. >> > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > From weigelt at metux.de Wed May 9 11:12:19 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:12:19 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641E1BE.80207@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> Message-ID: <20070509151219.GJ28731@nibiru.local> * Joe Bordes schrieb: Hi, > Please take a look at the existng merge system for accounts. Where is it ? > The idea is that you open up OO and write the template, where you want > the contact name (for example) you put CONTACT_NAME and this gets > substituted dynamically when you choose the template and the contact. > If we add this feature to invoice, you could write your invoice in word > and use INVOICE_NUMBER or INVOICE_DATE for example. Actually, I'm not interested in having to cope with blobs like OO, neither do I have anything to do w/ M$ crap. That's totally irrelevant to me. All I want is that the already existing pdf generation stuff produces an high quality pdf preprint for my bills - w/o requiring any manual intervention. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 11:15:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 17:15:35 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509142328.GH28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 04:23:28PM +0200 References: <20070509142328.GH28731@nibiru.local> Message-ID: <20070509171535.F3824@Strawberry.COM> Hi, or opportunity c) handle organization and orgunit as yet another CRMEntities would be the best fit into the internal vtiger design for my point of view. The effort would be even more than just introducing an orgid (code-changes and cleanups), but from the maintainability point of view it would be a clear and straight forward solution. Jens On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I've found an big-fat problem with the organization modeling in > the DB: > > The org is always referenced by its name ! > To be clear: its the *printable* name, which appears for example > on the bill. > > So now it's clear, why it cannot be changed in the settings ;-O > > It appears the name is also abused as ident, which is the key > problem. There's no additional ID here. > > To fix this, we have two options: > > a) Add an numerical ID to the organization table and fix all the > schema to reference on that. This would probably be the most > clean model, but requires much care on schema updates. > > b) Add an new text field (ie. "official_name") which now carries > the actual *name* (ie. for printing on the invoice) and leave > evrything else untouched. Nearly trivial to implement, but maybe > not very clean design. > > > > Comments ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 11:26:50 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:26:50 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <4641E83A.2030603@tsolucio.com> Very good idea!! Joe TSolucio Jens Hamisch escribi?: > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities > > > would be the best fit into the internal vtiger design for my > point of view. > > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. > > > Jens > > > > On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > >> Hi folks, >> >> >> I've found an big-fat problem with the organization modeling in >> the DB: >> >> The org is always referenced by its name ! >> To be clear: its the *printable* name, which appears for example >> on the bill. >> >> So now it's clear, why it cannot be changed in the settings ;-O >> >> It appears the name is also abused as ident, which is the key >> problem. There's no additional ID here. >> >> To fix this, we have two options: >> >> a) Add an numerical ID to the organization table and fix all the >> schema to reference on that. This would probably be the most >> clean model, but requires much care on schema updates. >> >> b) Add an new text field (ie. "official_name") which now carries >> the actual *name* (ie. for printing on the invoice) and leave >> evrything else untouched. Nearly trivial to implement, but maybe >> not very clean design. >> >> >> >> Comments ? >> >> cu >> -- >> --------------------------------------------------------------------- >> Enrico Weigelt == metux IT service >> >> phone: +49 36207 519931 www: http://www.metux.de/ >> fax: +49 36207 519932 email: contact at metux.de >> cellphone: +49 174 7066481 >> --------------------------------------------------------------------- >> -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- >> --------------------------------------------------------------------- >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > From jorge.torres.maldonado at gmail.com Wed May 9 11:28:10 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 11:28:10 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509151219.GJ28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> Message-ID: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Hi, I don't see why having other formats output support would be a problem, Jen's idea of having templates done in OO or others, is great; simply make your template on whatever editor you prefer, M$, OO, vi. upload and next time you generate invoices, buy orders, or as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, but I certainly want to see Jens work, where can I get it? Thanks, Jorge On 5/9/07, Enrico Weigelt wrote: > > * Joe Bordes schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the contact. > > If we add this feature to invoice, you could write your invoice in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/8a056c99/attachment-0002.html From weigelt at metux.de Wed May 9 11:27:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:27:49 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <20070509152749.GK28731@nibiru.local> * Jens Hamisch schrieb: > > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities What does that exactly mean ? Schema change necessary for that ? > would be the best fit into the internal vtiger design for my > point of view. ACK. > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. ACK. So: what has to be done for that ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 11:39:01 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:39:01 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <4641EB15.70205@tsolucio.com> http://forums.vtiger.com/viewtopic.php?t=14501 Jorge Torres escribi?: > Hi, > > I don't see why having other formats output support would be a > problem, Jen's idea of having templates done in OO or others, is > great; simply make your template on whatever editor you prefer, M$, > OO, vi. upload and next time you generate invoices, buy orders, or > as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont > know if those are Jen's plans, but I certainly want to see Jens > work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, *Enrico Weigelt* > wrote: > > * Joe Bordes > schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where > you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the > contact. > > If we add this feature to invoice, you could write your invoice > in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From jens at Strawberry.COM Wed May 9 12:02:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:02:37 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com>; from Jorge Torres on Wed, May 09, 2007 at 11:28:10AM -0400 References: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <20070509180237.G3824@Strawberry.COM> Hi, I'd prefer a solution that is more generic. The thing I'm not happy about is to introduce another dependency into vtiger. However if it becomes necessary, than I'd suggest to focus on more actual products than latex. OpenOffice and StarOffice both support the open document standard. I don't know if M$ will support it some day, too, but the office suites mentioned above both run on all operation systems. Finally those who just want to read and print an invoice may do not have to install the entire office suite. They may use the document viewers available. There's another thing I'm missing in vtiger: document management. vtiger's slogan is to reflect an entire customer life cycle. Today we have campains, quotes, sales-order and invoices. There are open issues like contracts and statements that are missing. But this is just a more or less 'technical' point of view. What about all the letters written to (and received from) a customer. This is also part of the life-cycle and therefor should be managed by vtiger. Thus: what we need is an interface to the office suites. And the logical consequence would be: All documents produced by vtiger should be based on the same standard as the documents managed by vtiger. Than it would be easy to manage self-produced documents as any other documents, too. My conclusion: Use the open document standard instead of latex. Jens On Wed, May 09, 2007 at 11:28:10AM -0400, Jorge Torres wrote: > Hi, > > I don't see why having other formats output support would be a problem, > Jen's idea of having templates done in OO or others, is great; simply make > your template on whatever editor you prefer, M$, OO, vi. upload and next > time you generate invoices, buy orders, or as the case might be, you > have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, > but I certainly want to see Jens work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Joe Bordes schrieb: > > > > Hi, > > > > > Please take a look at the existng merge system for accounts. > > > > Where is it ? > > > > > The idea is that you open up OO and write the template, where you want > > > the contact name (for example) you put CONTACT_NAME and this gets > > > substituted dynamically when you choose the template and the contact. > > > If we add this feature to invoice, you could write your invoice in word > > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > > > Actually, I'm not interested in having to cope with blobs like OO, > > neither do I have anything to do w/ M$ crap. That's totally > > irrelevant to me. > > > > All I want is that the already existing pdf generation stuff > > produces an high quality pdf preprint for my bills - w/o requiring > > any manual intervention. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 9 12:06:40 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:06:40 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509152749.GK28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 05:27:49PM +0200 References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> <20070509152749.GK28731@nibiru.local> Message-ID: <20070509180640.H3824@Strawberry.COM> Hi, regarding the schema: just introduce an organization ID and add a constraint to the CRMEntity table. (IMHO orgunit already has an orgunitid - w/o looking at the code). code changes are more complex: Mainly the Save methods have to be reviewed whether they may be reduced to the super class methods. Jens On Wed, May 09, 2007 at 05:27:49PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > > > Hi, > > > > > > or opportunity > > > > c) handle organization and orgunit as yet another CRMEntities > > What does that exactly mean ? > Schema change necessary for that ? > > > would be the best fit into the internal vtiger design for my > > point of view. > > ACK. > > > The effort would be even more than just introducing an orgid > > (code-changes and cleanups), but from the maintainability point > > of view it would be a clear and straight forward solution. > > ACK. > > So: what has to be done for that ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 14:57:58 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 20:57:58 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509180237.G3824@Strawberry.COM> References: <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> Message-ID: <20070509185758.GM28731@nibiru.local> * Jens Hamisch schrieb: Hi, > I'd prefer a solution that is more generic. well, my approach is quite generic ;-p > The thing I'm not happy about is to introduce another > dependency into vtiger. Fearing dependencies is what makes projects really fat and unmaintainable. Mozilla is an good (bad) example for that ;P BTW: you don't need to have (la)tex. You can use some other renderer (ie. fpdf-based, plain html, ...) > However if it becomes necessary, than I'd suggest to focus > on more actual products than latex. Yes, Latex is quite old, but it's also quite, quite stable. Coding activity is no appropriate indicator on quality. > OpenOffice and StarOffice both support the open document standard. Nice. Do you expect me to have that blod installed+running just to get an pdf bill ? > I don't know if M$ will support it some day, too, but the office > suites mentioned above both run on all operation systems. Finally > those who just want to read and print an invoice may do not have > to install the entire office suite. They may use the document > viewers available. I do *not* want any bit in some $office_format. I just want to have my bills as pdf w/ *my* custom layout. Latex is an very proven approach. > There's another thing I'm missing in vtiger: document management. Ugh, that's another story ... > And the logical consequence would be: All documents produced by > vtiger should be based on the same standard as the documents managed > by vtiger. Than it would be easy to manage self-produced documents > as any other documents, too. Interface != Storage/Encoding/Format. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From javawaba at hotmail.com Wed May 9 20:14:27 2007 From: javawaba at hotmail.com (Jim Weir) Date: Wed, 09 May 2007 20:14:27 -0400 Subject: [Vtigercrm-developers] ?? Message-ID: how do I unsubscribe from this list? _________________________________________________________________ Catch suspicious messages before you open them?with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 From brett.hooker at roarz.com Wed May 9 23:24:05 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 10 May 2007 13:24:05 +1000 Subject: [Vtigercrm-developers] VT5 Outlook Plugin Development Questions Message-ID: <46429055.4080208@roarz.com> Team, Which version of VB is used to develop/maintain the VT5 Outlook Plugin? Is there wiki/starter on contributing to the VT5 Outlook Plugin? Thanks, Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/4d8fcdbc/attachment-0002.html From gopals at vtiger.com Thu May 10 00:48:25 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 10 May 2007 10:18:25 +0530 Subject: [Vtigercrm-developers] ?? In-Reply-To: References: Message-ID: <4642A419.3010003@vtiger.com> Hi, You can unsubscribe from the developer list at: http://lists.vtigercrm.com/mailman/listinfo/vtigercrm-developers Thanks, Gopal Jim Weir wrote: > how do I unsubscribe from this list? > > _________________________________________________________________ > Catch suspicious messages before you open them---with Windows Live > Hotmail. > http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/598fe713/attachment-0002.html From jens at Strawberry.COM Thu May 10 03:37:41 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 10 May 2007 09:37:41 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509185758.GM28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 08:57:58PM +0200 References: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> <20070509185758.GM28731@nibiru.local> Message-ID: <20070510093741.B7494@Strawberry.COM> Hi, > I do *not* want any bit in some $office_format. I just want to > have my bills as pdf w/ *my* custom layout. Latex is an very > proven approach. let's get back to the generic solution: (la)tex is not standard on Unix platforms, but (g|t|n)roff and tbl is! Those provide enough features to produce high quality formulars. And they do not intro- duce another prerequisite. I havn't had a look at what finally came into the 5.0.3 branch. But I already introduced different pdf templates for all organizations and orgunits ... > > There's another thing I'm missing in vtiger: document management. > > Ugh, that's another story ... > > > And the logical consequence would be: All documents produced by > > vtiger should be based on the same standard as the documents managed > > by vtiger. Than it would be easy to manage self-produced documents > > as any other documents, too. > > Interface != Storage/Encoding/Format. Agree. A document management should be capable of handling any format of a document, so Office docs, scans and also latex would not contradict to the document management approach. However, to get more things covered office would be the first choice, because to create letters out of a vtiger attached document management, we need an interface to the office suite (which of course could be simply the creation of a base document that becomes opened). Having this interface, we have evverything at hand to simply create any formular w/o interfacing to yet another monstrum of third party software (which latex definitely is!). Also the latex approach is even more complex, because the templates themselfes prerequisite according latex extensions to be installed (at least may!). In comparison the office suites are monolithic and therefor complete. And finally: latex was and will be forever a system used by some experts. It is not addressed to people thout programming skills. I'm afraid it will not be possible to hand over the template definition to one of your sales and marketing people if it is based on latex. Office keeps this door open ... Jens -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From kenlyle at yahoo.com Thu May 10 10:12:38 2007 From: kenlyle at yahoo.com (Ken Lyle) Date: Thu, 10 May 2007 07:12:38 -0700 (PDT) Subject: [Vtigercrm-developers] Document Management In-Reply-To: Message-ID: <448400.55472.qm@web36405.mail.mud.yahoo.com> I have attended a few webinars from Alfresco, and they seem to have a good open source document management and web content management system. I have the impression that they are very standards compliant, like WebDAV, and something that makes their repository show up as a shared drive, and have some cool toys like rules that do automatic format conversions, say of each .doc to a PDF for the archive version. It seems like it should be only a 'loose dependency', which might make everyone happy. And, for the merging itself, maybe can use GoogleApps, or ThinkFree, or one of the free web suites that will save to .doc, .pdf, etc. That seems like a dependency that actually liberates the developers, the users, and their IT staffs from deploying software. Maybe you wizards can run with one of these ideas... Ken Think bigger than 'left' vs. 'right'- basic freedoms are under attack- http://www.healthfreedomusa.org/index.php/?cat=2 From weigelt at metux.de Thu May 10 11:19:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:19:20 +0200 Subject: [Vtigercrm-developers] [PATCH] 5.1_jens vs. jens' private Message-ID: <20070510151920.GA25395@nibiru.local> Hi folks, here's a bunch of patches between the 5.1_jens branch and jens's private tree, cleaned up a little bit. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/database/Postgres8.php htdocs/include/database/Postgres8.php --- orig/include/database/Postgres8.php 2007-05-04 16:11:49.000000000 +0200 +++ htdocs/include/database/Postgres8.php 2007-05-07 14:23:49.000000000 +0200 @@ -1,144 +1,144 @@ -info( "fixPostgresQuery: ".$query); - - // If we already have an order or group cluase separate ist for later use - if( strpos($queryRecord,'GROUP') > 0) - { - $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); - if( strpos($groupClause,'ORDER') > 0) - { - $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); - $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); - } - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); - } - - if( strpos($queryRecord,'ORDER') > 0) - { - $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); - } - - // Construkt the privateGroupList from the filed list by separating combined - // record.field entries - $privateGroupList = array(); - $token = strtok( $queryFields, ", () "); - while( $token !== false) { - if( strpos( $token, ".") !== false) { - array_push( $privateGroupList, $token); - } - $token = strtok( ", () "); - } - sort( $privateGroupList); - $groupFields = ""; - $last = ""; - for( $i = 0; $i < count($privateGroupList); $i++) { - if( $last != $privateGroupList[$i]) { - if( $groupFields == "") - $groupFields = $privateGroupList[$i]; - else - $groupFields .= ",".$privateGroupList[$i]; - } - $last = $privateGroupList[$i]; - } - - // Rebuild the query - $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; - if( $groupClause != "" ) - $groupClause = $groupClause.",".$groupFields; - else - $groupClause = $groupFields; - $query .= expandStar($groupClause,$log)." ".$orderClause; - - if( $debug) - $log->info( "fixPostgresQuery result: ".$query); - - return( $query); -} - -// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause -function expandStar($fieldlist,$log) -{ - $expanded=""; - $field = strtok( $fieldlist, ","); - while( $field != "") - { - //remove leading and trailing spaces - $field = trim( $field); - - //still spaces in the field indicate a complex structure - if( strpos( $field, " ") == 0) - { - - //locate table- and fieldname - $pos = strpos( $field, "."); - if( $pos > 0) - { - $table = substr( $field, 0, $pos); - $subfield = substr( $field, $pos+1, strlen($field)-$pos); - - //do we need to expand? - if( $subfield == "*") - $field = expandRecord($table,$log); - } - - //add the propably expanded field to the querylist - if( $expanded == "") - $expanded = $field; - else - $expanded .= ",".$field; - } - - //next field - $field = strtok(","); - } - - //return the expanded fieldlist - return( $expanded); -} - -//return an expanded table field list -function expandRecord($table,$log) -{ +info( "fixPostgresQuery: ".$query); + + // If we already have an order or group cluase separate ist for later use + if( strpos($queryRecord,'GROUP') > 0) + { + $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); + if( strpos($groupClause,'ORDER') > 0) + { + $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); + $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); + } + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); + } + + if( strpos($queryRecord,'ORDER') > 0) + { + $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); + } + + // Construkt the privateGroupList from the filed list by separating combined + // record.field entries + $privateGroupList = array(); + $token = strtok( $queryFields, ", () "); + while( $token !== false) { + if( strpos( $token, ".") !== false) { + array_push( $privateGroupList, $token); + } + $token = strtok( ", () "); + } + sort( $privateGroupList); + $groupFields = ""; + $last = ""; + for( $i = 0; $i < count($privateGroupList); $i++) { + if( $last != $privateGroupList[$i]) { + if( $groupFields == "") + $groupFields = $privateGroupList[$i]; + else + $groupFields .= ",".$privateGroupList[$i]; + } + $last = $privateGroupList[$i]; + } + + // Rebuild the query + $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; + if( $groupClause != "" ) + $groupClause = $groupClause.",".$groupFields; + else + $groupClause = $groupFields; + $query .= expandStar($groupClause,$log)." ".$orderClause; + + if( $debug) + $log->info( "fixPostgresQuery result: ".$query); + + return( $query); +} + +// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause +function expandStar($fieldlist,$log) +{ + $expanded=""; + $field = strtok( $fieldlist, ","); + while( $field != "") + { + //remove leading and trailing spaces + $field = trim( $field); + + //still spaces in the field indicate a complex structure + if( strpos( $field, " ") == 0) + { + + //locate table- and fieldname + $pos = strpos( $field, "."); + if( $pos > 0) + { + $table = substr( $field, 0, $pos); + $subfield = substr( $field, $pos+1, strlen($field)-$pos); + + //do we need to expand? + if( $subfield == "*") + $field = expandRecord($table,$log); + } + + //add the propably expanded field to the querylist + if( $expanded == "") + $expanded = $field; + else + $expanded .= ",".$field; + } + + //next field + $field = strtok(","); + } + + //return the expanded fieldlist + return( $expanded); +} + +//return an expanded table field list +function expandRecord($table,$log) +{ global $adb; $result = ""; $subfields = $adb->getColumnNames($table); - - //construct an entity string - for( $i=0; $i 0) - $result = substr( $result, 0, strlen( $result) -1); - - //return out new string - return( $result); -} -?> + + //construct an entity string + for( $i=0; $i 0) + $result = substr( $result, 0, strlen( $result) -1); + + //return out new string + return( $result); +} +?> -------------- next part -------------- diff -ruN orig/data/SugarBean.php htdocs/data/SugarBean.php --- orig/data/SugarBean.php 2007-05-04 16:11:47.000000000 +0200 +++ htdocs/data/SugarBean.php 2007-05-07 14:40:44.000000000 +0200 @@ -1,451 +1,451 @@ -id) || $this->id == "") - { - $isUpdate = false; - } - - if ( $this->new_with_id == true ) - { - $isUpdate = false; - } - - //$this->date_modified = $this->db->formatDate(date('YmdHis')); - $this->date_modified = date('YmdHis'); - if (isset($current_user)) $this->modified_user_id = $current_user->id; - - if($isUpdate) - { - $query = "Update ".$this->table_name." set "; - } - else - { - //$this->date_entered = $this->db->formatDate(date('YmdHis')); - $this->date_entered = date('YmdHis'); - - if($this->new_schema && - $this->new_with_id == false) - { - $this->id = $this->db->getUniqueID("vtiger_users"); - } - - $query = "INSERT into ".$this->table_name; - } - // todo - add date modified to the list. - - // write out the SQL statement. - //$query .= $this->table_name." set "; - - $firstPass = 0; - $insKeys = '('; - $insValues = '('; - $updKeyValues=''; - foreach($this->column_fields as $field) - { - // Do not write out the id vtiger_field on the update statement. - // We are not allowed to change ids. - if($isUpdate && ('id' == $field)) - continue; - - // Only assign variables that have been set. - if(isset($this->$field)) - { - // Try comparing this element with the head element. - if(0 == $firstPass) - { - $firstPass = 1; - } - else - { - if($isUpdate) - { - $updKeyValues = $updKeyValues.", "; - } - else - { - $insKeys = $insKeys.", "; - $insValues = $insValues.", "; - } - } - /*else - $query = $query.", "; - - $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; - */ - if($isUpdate) - { - $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - else - { - $insKeys = $insKeys.$field; - $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - } - } - - if($isUpdate) - { - $query = $query.$updKeyValues." WHERE ID = '$this->id'"; - $this->log->info("Update $this->object_name: ".$query); - } - else - { - $query = $query.$insKeys.") VALUES ".$insValues.")"; - $this->log->info("Insert: ".$query); - } - - $this->db->query($query, true); - - // If this is not an update then store the id for later. - if(!$isUpdate && !$this->new_schema && !$this->new_with_id) - { - $this->db->println("Illegal Access - SugarBean"); - //this is mysql specific - $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); - } - - return $this->id; - } - - - /** - * This function retrieves a record of the appropriate type from the DB. - * It fills in all of the vtiger_fields from the DB into the object it was called on. - * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. - * returns this - The object that it was called apon or null if exactly 1 record was not found. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - function retrieve($id = -1, $encodeThis=true) { - if ($id == -1) { - $id = $this->id; - } - if($id == '') { - return null; - } -// GS porting vtiger_crmentity -$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; -// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; - $this->log->debug("Retrieve $this->object_name: ".$query); - - $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); - - if(empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result, -1, $encodeThis); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - */ - - function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { - $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); - - $query = $this->create_list_query($order_by, $where); - - return $this->process_list_query($query, $row_offset, $limit, $max); - } - - /** - * This function returns a full (ie non-paged) list of the current object type. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function get_full_list($order_by = "", $where = "") { - $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - $result =& $this->db->query($query, false); - - if($this->db->getRowCount($result) > 0){ - - // We have some data. - while ($row = $this->db->fetchByAssoc($result)) { - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else { - $this->$field = ''; - } - } - - - $list[] = clone($this); //added clone tosupport PHP5 - } - } - - if (isset($list)) return $list; - else return null; - - } - - function create_list_query($order_by, $where) - { - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - return $query; - } - - - function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) - { - global $list_max_entries_per_page; - $this->log->debug("process_list_query: ".$query); - if(!empty($limit) && $limit != -1){ - $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); - }else{ - $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); - } - - $list = Array(); - if($max_per_page == -1){ - $max_per_page = $list_max_entries_per_page; - } - $rows_found = $this->db->getRowCount($result); - - $this->log->debug("Found $rows_found ".$this->object_name."s"); - - $previous_offset = $row_offset - $max_per_page; - $next_offset = $row_offset + $max_per_page; - - if($rows_found != 0) - { - - // We have some data. - - for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - - $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else - { - $this->$field = ""; - } - } - - - $list[] = clone($this); //added clone to support PHP5 - } - } - - $response = Array(); - $response['list'] = $list; - $response['row_count'] = $rows_found; - $response['next_offset'] = $next_offset; - $response['previous_offset'] = $previous_offset; - - return $response; - } - - - /** - * Track the viewing of a detail record. This leverages get_summary_text() which is object specific - * params $user_id - The user that is viewing the record. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function track_view($user_id, $current_module,$id='') - { - $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); - - $tracker = new Tracker(); - $tracker->track_view($user_id, $current_module, $id, ''); - } - - - /** This function should be overridden in each module. It marks an item as deleted. - * If it is not overridden, then marking this type of item is not allowed - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function mark_deleted($id) - { - $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; - $this->db->query($query, true,"Error marking record deleted: "); - - $this->mark_relationships_deleted($id); - - // Take the item off of the recently viewed lists. - $tracker = new Tracker(); - $tracker->delete_item_history($id); - - } - - - /* This is to allow subclasses to fill in row specific columns of a list view form - function list_view_parse_additional_sections(&$list_form) - { - } - */ - /* This function assigns all of the values into the template for the list view - function get_list_view_array(){ - $return_array = Array(); - - foreach($this->list_fields as $field) - { - $return_array[strtoupper($field)] = $this->$field; - } - - return $return_array; - } - function get_list_view_data() - { - - return $this->get_list_view_array(); - } - - function get_where(&$fields_array) - { - $where_clause = "WHERE "; - $first = 1; - foreach ($fields_array as $name=>$value) - { - if ($first) - { - $first = 0; - } - else - { - $where_clause .= " AND "; - } - - $where_clause .= "$name = ".$adb->quote($value).""; - } - - $where_clause .= " AND deleted=0"; - return $where_clause; - } - - - function retrieve_by_string_fields($fields_array, $encode=true) - { - $where_clause = $this->get_where($fields_array); - - $query = "SELECT * FROM $this->table_name $where_clause"; - $this->log->debug("Retrieve $this->object_name: ".$query); - $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); - if( empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result,-1, $encode); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - - // this method is called during an import before inserting a bean - // define an associative array called $special_fields - // the keys are user defined, and don't directly map to the bean's vtiger_fields - // the value is the method name within that bean that will do extra - // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' - - function process_special_fields() - { - foreach ($this->special_functions as $func_name) - { - if ( method_exists($this,$func_name) ) - { - $this->$func_name(); - } - } - } - - */ -} - - -?> +id) || $this->id == "") + { + $isUpdate = false; + } + + if ( $this->new_with_id == true ) + { + $isUpdate = false; + } + + //$this->date_modified = $this->db->formatDate(date('YmdHis')); + $this->date_modified = date('YmdHis'); + if (isset($current_user)) $this->modified_user_id = $current_user->id; + + if($isUpdate) + { + $query = "Update ".$this->table_name." set "; + } + else + { + //$this->date_entered = $this->db->formatDate(date('YmdHis')); + $this->date_entered = date('YmdHis'); + + if($this->new_schema && + $this->new_with_id == false) + { + $this->id = $this->db->getUniqueID("vtiger_users"); + } + + $query = "INSERT into ".$this->table_name; + } + // todo - add date modified to the list. + + // write out the SQL statement. + //$query .= $this->table_name." set "; + + $firstPass = 0; + $insKeys = '('; + $insValues = '('; + $updKeyValues=''; + foreach($this->column_fields as $field) + { + // Do not write out the id vtiger_field on the update statement. + // We are not allowed to change ids. + if($isUpdate && ('id' == $field)) + continue; + + // Only assign variables that have been set. + if(isset($this->$field)) + { + // Try comparing this element with the head element. + if(0 == $firstPass) + { + $firstPass = 1; + } + else + { + if($isUpdate) + { + $updKeyValues = $updKeyValues.", "; + } + else + { + $insKeys = $insKeys.", "; + $insValues = $insValues.", "; + } + } + /*else + $query = $query.", "; + + $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; + */ + if($isUpdate) + { + $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + else + { + $insKeys = $insKeys.$field; + $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + } + } + + if($isUpdate) + { + $query = $query.$updKeyValues." WHERE ID = '$this->id'"; + $this->log->info("Update $this->object_name: ".$query); + } + else + { + $query = $query.$insKeys.") VALUES ".$insValues.")"; + $this->log->info("Insert: ".$query); + } + + $this->db->query($query, true); + + // If this is not an update then store the id for later. + if(!$isUpdate && !$this->new_schema && !$this->new_with_id) + { + $this->db->println("Illegal Access - SugarBean"); + //this is mysql specific + $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); + } + + return $this->id; + } + + + /** + * This function retrieves a record of the appropriate type from the DB. + * It fills in all of the vtiger_fields from the DB into the object it was called on. + * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. + * returns this - The object that it was called apon or null if exactly 1 record was not found. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + function retrieve($id = -1, $encodeThis=true) { + if ($id == -1) { + $id = $this->id; + } + if($id == '') { + return null; + } +// GS porting vtiger_crmentity +$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; +// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; + $this->log->debug("Retrieve $this->object_name: ".$query); + + $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); + + if(empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result, -1, $encodeThis); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + */ + + function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { + $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); + + $query = $this->create_list_query($order_by, $where); + + return $this->process_list_query($query, $row_offset, $limit, $max); + } + + /** + * This function returns a full (ie non-paged) list of the current object type. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_full_list($order_by = "", $where = "") { + $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + $result =& $this->db->query($query, false); + + if($this->db->getRowCount($result) > 0){ + + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else { + $this->$field = ''; + } + } + + + $list[] = clone($this); //added clone tosupport PHP5 + } + } + + if (isset($list)) return $list; + else return null; + + } + + function create_list_query($order_by, $where) + { + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + return $query; + } + + + function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) + { + global $list_max_entries_per_page; + $this->log->debug("process_list_query: ".$query); + if(!empty($limit) && $limit != -1){ + $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); + }else{ + $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); + } + + $list = Array(); + if($max_per_page == -1){ + $max_per_page = $list_max_entries_per_page; + } + $rows_found = $this->db->getRowCount($result); + + $this->log->debug("Found $rows_found ".$this->object_name."s"); + + $previous_offset = $row_offset - $max_per_page; + $next_offset = $row_offset + $max_per_page; + + if($rows_found != 0) + { + + // We have some data. + + for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + + $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else + { + $this->$field = ""; + } + } + + + $list[] = clone($this); //added clone to support PHP5 + } + } + + $response = Array(); + $response['list'] = $list; + $response['row_count'] = $rows_found; + $response['next_offset'] = $next_offset; + $response['previous_offset'] = $previous_offset; + + return $response; + } + + + /** + * Track the viewing of a detail record. This leverages get_summary_text() which is object specific + * params $user_id - The user that is viewing the record. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function track_view($user_id, $current_module,$id='') + { + $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); + + $tracker = new Tracker(); + $tracker->track_view($user_id, $current_module, $id, ''); + } + + + /** This function should be overridden in each module. It marks an item as deleted. + * If it is not overridden, then marking this type of item is not allowed + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function mark_deleted($id) + { + $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; + $this->db->query($query, true,"Error marking record deleted: "); + + $this->mark_relationships_deleted($id); + + // Take the item off of the recently viewed lists. + $tracker = new Tracker(); + $tracker->delete_item_history($id); + + } + + + /* This is to allow subclasses to fill in row specific columns of a list view form + function list_view_parse_additional_sections(&$list_form) + { + } + */ + /* This function assigns all of the values into the template for the list view + function get_list_view_array(){ + $return_array = Array(); + + foreach($this->list_fields as $field) + { + $return_array[strtoupper($field)] = $this->$field; + } + + return $return_array; + } + function get_list_view_data() + { + + return $this->get_list_view_array(); + } + + function get_where(&$fields_array) + { + $where_clause = "WHERE "; + $first = 1; + foreach ($fields_array as $name=>$value) + { + if ($first) + { + $first = 0; + } + else + { + $where_clause .= " AND "; + } + + $where_clause .= "$name = ".$adb->quote($value).""; + } + + $where_clause .= " AND deleted=0"; + return $where_clause; + } + + + function retrieve_by_string_fields($fields_array, $encode=true) + { + $where_clause = $this->get_where($fields_array); + + $query = "SELECT * FROM $this->table_name $where_clause"; + $this->log->debug("Retrieve $this->object_name: ".$query); + $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); + if( empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result,-1, $encode); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + + // this method is called during an import before inserting a bean + // define an associative array called $special_fields + // the keys are user defined, and don't directly map to the bean's vtiger_fields + // the value is the method name within that bean that will do extra + // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' + + function process_special_fields() + { + foreach ($this->special_functions as $func_name) + { + if ( method_exists($this,$func_name) ) + { + $this->$func_name(); + } + } + } + + */ +} + + +?> -------------- next part -------------- diff -ruN orig/include/utils/EditViewUtils.php htdocs/include/utils/EditViewUtils.php --- orig/include/utils/EditViewUtils.php 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/utils/EditViewUtils.php 2007-05-07 14:45:15.000000000 +0200 @@ -157,7 +157,7 @@ } $fieldvalue [] = $options; } - elseif($uitype == 17) + elseif($uitype == 17 || $uitype == 18) { $editview_label[]=$mod_strings[$fieldlabel]; $fieldvalue [] = $value; @@ -1194,6 +1194,11 @@ $fieldvalue[] = $value; } + // For inheritance + if ( in_array($uitype,array(3,4,18,31,32)) ) { + $fieldvalue[] = $col_fields[$fieldname."@##@"]; + } + // Mike Crowe Mod --------------------------------------------------------force numerics right justified. if ( !eregi("id=",$custfld) ) $custfld = preg_replace("/debug("Exiting getOutputHtml method ..."); return $final_arr; } @@ -1883,4 +1889,104 @@ } +/** This function returns the detailed list of organization units associated to +* the selected organization +* Param $organization - organization object +*/ + +function getOrgUnits($organization,$orgunitid="") +{ + // The array we're about to build + $orgunittab = array(); + $fields = "orgunitid,type,name,address,city,state,country,code,phone,fax,website"; + $fields .= ",logoname,quote_template,so_template,po_template,invoice_template"; + global $adb; + + // Parameter check + if( !isset( $organization) || $organization == '' || + !isset( $organization->id) || $organization->id == '') + return $orgunittab; + + // Database query + if( $orgunitid != "0") + $query = "SELECT vtiger_orgunit.orgunitid AS orgunitid,"; + else + $query = "SELECT 0 AS orgunitid,"; + + // logoname is only defined in the organization record. + $query .= "'@##@' AS logoname, vtiger_organizationdetails.logoname AS org_logoname"; + + foreach( split( ',', $fields) as $field) { + if( $field != "orgunitid" && $field != "logoname") { + if( $orgunitid != "0") + $query .= ",vtiger_orgunit.".$field." AS ".$field; + else + $query .= ",NULL AS ".$field; + if( $field != "type" && $field != "name") + $query .= ",vtiger_organizationdetails.".$field." AS org_".$field; + } + } + + if( $orgunitid != "0" ) { + // database joins + $query .= " FROM vtiger_orgunit + LEFT JOIN vtiger_organizationdetails + ON vtiger_orgunit.organizationname=vtiger_organizationdetails.organizationname "; + + // single or list query? + if( $orgunitid == "") + $query .= "WHERE vtiger_orgunit.organizationname='".$organization->id."' "; + else + $query .= "WHERE vtiger_orgunit.orgunitid=".$orgunitid." "; + + // do not return deleted orgunits + $query .= "AND vtiger_orgunit.deleted=0"; + } + + else { + $query .= " FROM vtiger_organizationdetails "; + $query .= " WHERE vtiger_organizationdetails.organizationname='".$organization->id."' "; + } + + // Do not return deleted organizations + $query .= " AND vtiger_organizationdetails.deleted=0"; + + $result = $adb->query( $query); + $noofrows = $adb->num_rows($result); + + // Get all rows from database + for($j = 0; $j < $noofrows; $j++) { + $orgunit = array(); + foreach( split( ',', $fields) as $field) { + if( $orgunitid != "0") { + $orgunit[$field] = $adb->query_result($result,$j,$field); + + // Inherited and extended fields + if( substr( $orgunit[$field], 0, 4) == "@##@") { + if( $field == "name") { + $orgunit[$field] = substr($orgunit[$field], 4, strlen( $orgunit[$field])-4); + if( $orgunitid != "") + $orgunit[$field] = $organization->id." ".$orgunit[$field]; + } else { + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + } + + // no orgunit selected + else { + if( $field == "name") + $orgunit[$field] = $organization->id; + elseif( $field == "orgunitid") + $orgunit[$field] = 0; + else + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + $id = $orgunit["orgunitid"]; + $orgunittab[$id] = $orgunit; + } + // Return what we've found + return $orgunittab; +} ?> -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 14:52:56.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-04 15:04:43.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Accounts/Delete.php htdocs/modules/Accounts/Delete.php --- orig/modules/Accounts/Delete.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/Delete.php 2007-05-07 17:04:15.000000000 +0200 @@ -1,37 +1,37 @@ - + -------------- next part -------------- diff -ruN orig/modules/Accounts/DetailViewAjax.php htdocs/modules/Accounts/DetailViewAjax.php --- orig/modules/Accounts/DetailViewAjax.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/DetailViewAjax.php 2007-05-07 17:09:50.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Accounts"); - $acntObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving - { - $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $acntObj->id = $crmid; - $acntObj->mode = "edit"; - $acntObj->save("Accounts"); - if($acntObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Accounts"); + $acntObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving + { + $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $acntObj->id = $crmid; + $acntObj->mode = "edit"; + $acntObj->save("Accounts"); + if($acntObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN orig/Smarty/templates/RelatedLists.tpl htdocs/Smarty/templates/RelatedLists.tpl --- orig/Smarty/templates/RelatedLists.tpl 2007-05-04 16:12:15.000000000 +0200 +++ htdocs/Smarty/templates/RelatedLists.tpl 2007-05-08 22:57:59.000000000 +0200 @@ -122,8 +122,21 @@ {$SINGLE_MOD} {$APP.LBL_INFORMATION} {/if}   - {$APP.LBL_MORE} {$APP.LBL_INFORMATION} -   + {if $MODULE eq 'Products'} + {if $RELATEDLISTS ne ''} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {else} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {/if} +   + {else} + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} +   + {/if} @@ -137,12 +150,12 @@ -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 15:43:12.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-09 00:28:57.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Emails/EmailsAjax.php htdocs/modules/Emails/EmailsAjax.php --- orig/modules/Emails/EmailsAjax.php 2007-05-04 16:12:10.000000000 +0200 +++ htdocs/modules/Emails/EmailsAjax.php 2007-05-09 00:55:09.000000000 +0200 @@ -1,54 +1,54 @@ -retrieve_entity_info($crmid,"Emails"); - $modObj->column_fields[$fieldname] = $fieldvalue; - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Emails"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -elseif($_REQUEST['ajaxmode'] == 'qcreate') -{ - require_once('quickcreate.php'); -} -else -{ - require_once('include/Ajax/CommonAjax.php'); -} -?> +retrieve_entity_info($crmid,"Emails"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Emails"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +elseif($_REQUEST['ajaxmode'] == 'qcreate') +{ + require_once('quickcreate.php'); +} +else +{ + require_once('include/Ajax/CommonAjax.php'); +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Notes/Delete.php htdocs/modules/Notes/Delete.php --- htdocs.orig/modules/Notes/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Notes/Delete.php 2007-05-09 00:57:22.000000000 +0200 @@ -1,35 +1,35 @@ - + -------------- next part -------------- diff -ruN htdocs.orig/modules/Portal/Popup.php htdocs/modules/Portal/Popup.php --- htdocs.orig/modules/Portal/Popup.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Popup.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,68 +1,68 @@ -query($query); - $portalname = $adb->query_result($result,0,'portalname'); - $portalurl = $adb->query_result($result,0,'portalurl'); -} -$portal_inputs=''; -$portal_inputs.='
-
- - {include file='RelatedListsHidden.tpl'} -
- {include file='RelatedListContents.tpl'} -
- + + {include file='RelatedListsHidden.tpl'} +
+ {include file='RelatedListContents.tpl'} +
+ {*-- End of Blocks--*}
- - - - -
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
- - - - -
- - - - - - - - - - - -
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
-
- - - - -
-    - -
-'; - -echo $portal_inputs; - - -?> +query($query); + $portalname = $adb->query_result($result,0,'portalname'); + $portalurl = $adb->query_result($result,0,'portalurl'); +} +$portal_inputs=''; +$portal_inputs.='
+ + + + + +
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
+ + + + +
+ + + + + + + + + + + +
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
+
+ + + + +
+    + +
+
'; + +echo $portal_inputs; + + +?> diff -ruN htdocs.orig/modules/Portal/Portal.php htdocs/modules/Portal/Portal.php --- htdocs.orig/modules/Portal/Portal.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Portal.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,45 +1,45 @@ -println("just entered the SavePortal method"); - $portalid=$adb->getUniqueID('vtiger_portal'); - $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -/** Function to update the portal in database - * @param $portalname : Type String - * @param $portalurl : Type String - * @param $portalid : Type Integer - * This function updates the portal with the given $portalname,$portalurl - * This Returns $portalid - */ -function UpdatePortal($portalname,$portalurl,$portalid) -{ - global $adb; - $adb->println("just entered the SavePortal method"); - $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -?> +println("just entered the SavePortal method"); + $portalid=$adb->getUniqueID('vtiger_portal'); + $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +/** Function to update the portal in database + * @param $portalname : Type String + * @param $portalurl : Type String + * @param $portalid : Type Integer + * This function updates the portal with the given $portalname,$portalurl + * This Returns $portalid + */ +function UpdatePortal($portalname,$portalurl,$portalid) +{ + global $adb; + $adb->println("just entered the SavePortal method"); + $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Settings/TaxConfig.php htdocs/modules/Settings/TaxConfig.php --- htdocs.orig/modules/Settings/TaxConfig.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Settings/TaxConfig.php 2007-05-09 01:00:29.000000000 +0200 @@ -1,244 +1,244 @@ -assign("EDIT_MODE", 'true'); -} -elseif($_REQUEST['sh_edit_tax'] == 'true') -{ - $smarty->assign("SH_EDIT_MODE", 'true'); -} - -//To add tax -if($_REQUEST['add_tax_type'] == 'true') -{ - //Add the given tax name and value as a new tax type - echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); - $getlist = true; -} -elseif($_REQUEST['sh_add_tax_type'] == 'true') -{ - echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); - $getlist = true; -} - -//To Disable ie., delete or enable -if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') -{ - if($_REQUEST['disable'] == 'true') - changeDeleted($_REQUEST['taxname'],1); - else - changeDeleted($_REQUEST['taxname'],0); - $getlist = true; -} -elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') -{ - if($_REQUEST['sh_disable'] == 'true') - changeDeleted($_REQUEST['sh_taxname'],1,'sh'); - else - changeDeleted($_REQUEST['sh_taxname'],0,'sh'); - $getlist = true; -} - -//after done save or enable/disable or added new tax the list will be retrieved again from db -if($getlist) -{ - $tax_details = getAllTaxes(); - $sh_tax_details = getAllTaxes('all','sh'); -} - -$smarty->assign("TAX_COUNT", count($tax_details)); -$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); - -if(count($tax_details) == 0) - $smarty->assign("TAX_COUNT", 0); -if(count($sh_tax_details) == 0) - $smarty->assign("SH_TAX_COUNT", 0); - -$smarty->assign("TAX_VALUES", $tax_details); - -$smarty->assign("SH_TAX_VALUES", $sh_tax_details); - -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("MOD", $mod_strings); -$smarty->display("Settings/TaxConfig.tpl"); - - -/** Function to update the list of Tax percentages for the passed tax types - * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxPercentages($new_percentages, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_percentages as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} - -/** Function to update the list of Tax Labels for the taxes - * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxLabels($new_labels, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_labels as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} -/** Function used to add the tax type which will do database alterations - * @param string $taxlabel - tax label name to be added - * @param string $taxvalue - tax value to be added - * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table - * @return void - */ -function addTaxType($taxlabel, $taxvalue, $sh='') -{ - global $adb, $log; - $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); - - //First we will check whether the tax is already available or not - if($sh != '' && $sh == 'sh') - $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; - else - $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; - $check_res = $adb->query($check_query); - - if($adb->num_rows($check_res) > 0) - return "This tax is already available"; - - //if the tax is not available then add this tax. - //Add this tax as a column in related table - if($sh != '' && $sh == 'sh') - { - $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); - $taxname = "shtax".$taxid; - $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; - } - else - { - $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); - $taxname = "tax".$taxid; - $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; - } - $res = $adb->query($query); - - //if the tax is added as a column then we should add this tax in the list of taxes - if($res) - { - if($sh != '' && $sh == 'sh') - $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - else - $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - - $res1 = $adb->query($query1); - } - - $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); - if($res1) - return ''; - else - return "There may be some problem in adding the Tax type. Please try again"; -} - -/** Function used to Enable or Disable the tax type - * @param string $taxname - taxname to enable or disble - * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable - * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo - * @return void - */ -function changeDeleted($taxname, $deleted, $sh='') -{ - global $log, $adb; - $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); - - if($sh == 'sh') - $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); - else - $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); - $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); -} - -?> +assign("EDIT_MODE", 'true'); +} +elseif($_REQUEST['sh_edit_tax'] == 'true') +{ + $smarty->assign("SH_EDIT_MODE", 'true'); +} + +//To add tax +if($_REQUEST['add_tax_type'] == 'true') +{ + //Add the given tax name and value as a new tax type + echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); + $getlist = true; +} +elseif($_REQUEST['sh_add_tax_type'] == 'true') +{ + echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); + $getlist = true; +} + +//To Disable ie., delete or enable +if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') +{ + if($_REQUEST['disable'] == 'true') + changeDeleted($_REQUEST['taxname'],1); + else + changeDeleted($_REQUEST['taxname'],0); + $getlist = true; +} +elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') +{ + if($_REQUEST['sh_disable'] == 'true') + changeDeleted($_REQUEST['sh_taxname'],1,'sh'); + else + changeDeleted($_REQUEST['sh_taxname'],0,'sh'); + $getlist = true; +} + +//after done save or enable/disable or added new tax the list will be retrieved again from db +if($getlist) +{ + $tax_details = getAllTaxes(); + $sh_tax_details = getAllTaxes('all','sh'); +} + +$smarty->assign("TAX_COUNT", count($tax_details)); +$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); + +if(count($tax_details) == 0) + $smarty->assign("TAX_COUNT", 0); +if(count($sh_tax_details) == 0) + $smarty->assign("SH_TAX_COUNT", 0); + +$smarty->assign("TAX_VALUES", $tax_details); + +$smarty->assign("SH_TAX_VALUES", $sh_tax_details); + +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("APP", $app_strings); +$smarty->assign("MOD", $mod_strings); +$smarty->display("Settings/TaxConfig.tpl"); + + +/** Function to update the list of Tax percentages for the passed tax types + * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxPercentages($new_percentages, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_percentages as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} + +/** Function to update the list of Tax Labels for the taxes + * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxLabels($new_labels, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_labels as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} +/** Function used to add the tax type which will do database alterations + * @param string $taxlabel - tax label name to be added + * @param string $taxvalue - tax value to be added + * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table + * @return void + */ +function addTaxType($taxlabel, $taxvalue, $sh='') +{ + global $adb, $log; + $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); + + //First we will check whether the tax is already available or not + if($sh != '' && $sh == 'sh') + $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; + else + $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; + $check_res = $adb->query($check_query); + + if($adb->num_rows($check_res) > 0) + return "This tax is already available"; + + //if the tax is not available then add this tax. + //Add this tax as a column in related table + if($sh != '' && $sh == 'sh') + { + $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); + $taxname = "shtax".$taxid; + $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; + } + else + { + $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); + $taxname = "tax".$taxid; + $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; + } + $res = $adb->query($query); + + //if the tax is added as a column then we should add this tax in the list of taxes + if($res) + { + if($sh != '' && $sh == 'sh') + $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + else + $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + + $res1 = $adb->query($query1); + } + + $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); + if($res1) + return ''; + else + return "There may be some problem in adding the Tax type. Please try again"; +} + +/** Function used to Enable or Disable the tax type + * @param string $taxname - taxname to enable or disble + * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable + * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo + * @return void + */ +function changeDeleted($taxname, $deleted, $sh='') +{ + global $log, $adb; + $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); + + if($sh == 'sh') + $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); + else + $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); + $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); +} + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Users/DetailViewAjax.php htdocs/modules/Users/DetailViewAjax.php --- htdocs.orig/modules/Users/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/DetailViewAjax.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,35 +1,35 @@ - "; -$local_log =& LoggerManager::getLogger('UsersAjax'); +$local_log =& LoggerManager::getLogger('UsersAjax'); $my_status = "Failure"; -$ajaxaction = $_REQUEST["ajxaction"]; -if($ajaxaction == "DETAILVIEW") -{ - $crmid = $_REQUEST["recordid"]; - $tablename = $_REQUEST["tableName"]; - $fieldname = $_REQUEST["fldName"]; - $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); +$ajaxaction = $_REQUEST["ajxaction"]; +if($ajaxaction == "DETAILVIEW") +{ + $crmid = $_REQUEST["recordid"]; + $tablename = $_REQUEST["tableName"]; + $fieldname = $_REQUEST["fldName"]; + $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); $local_log->debug("Entering DetailViewAjax crmid=".$crmid." tab=".$tablename." fld=".$fieldname." val='".$fieldvalue."'"); - if($crmid != "") - { - $userObj = new Users(); - $userObj->retrieve_entity_info($crmid,"Users"); + if($crmid != "") + { + $userObj = new Users(); + $userObj->retrieve_entity_info($crmid,"Users"); //assigned organizations if( $fieldname == 'assigned_org[]') { @@ -173,30 +173,30 @@ $adb->completeTransaction(); //Organization assignment - require('modules/Users/GetUserOrg.php'); + require('modules/Users/GetUserOrg.php'); } //anything else is a field update else { - $userObj->column_fields[$fieldname] = $fieldvalue; - $userObj->id = $crmid; - $userObj->mode = "edit"; - $userObj->save("Users"); + $userObj->column_fields[$fieldname] = $fieldvalue; + $userObj->id = $crmid; + $userObj->mode = "edit"; + $userObj->save("Users"); } //result would be success as long as the user exists - if($userObj->id != "") - { - echo ":#:SUCCESS"; + if($userObj->id != "") + { + echo ":#:SUCCESS"; $my_status = "Success"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } $local_log->debug("Exit DetailViewAjax: ".$my_status); -} -?> +} +?> diff -ruN htdocs.orig/modules/Users/EditView.php htdocs/modules/Users/EditView.php --- htdocs.orig/modules/Users/EditView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/EditView.php 2007-05-09 01:01:55.000000000 +0200 @@ -42,7 +42,7 @@ $smarty->assign("ID",$_REQUEST['record']); $mode='edit'; if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) die ("Unauthorized access to user administration."); - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); $smarty->assign("USERNAME",$focus->last_name.' '.$focus->first_name); }else { @@ -59,6 +59,11 @@ $focus->column_fields['confirm_password']=''; } +if(is_admin($current_user)) + $smarty->assign("IS_ADMIN", true); +else + $smarty->assign("IS_ADMIN", false); + global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; @@ -111,9 +116,57 @@ $smarty->assign("HOMEORDER",$focus->getHomeOrder($focus->id)); $smarty->assign("DUPLICATE",$_REQUEST['isDuplicate']); - $smarty->assign('PARENTTAB',$_REQUEST['parenttab']); +//Organization assignment +if( $mode == "create" ) { + $orgs = array(); + $smarty_orgs = array($orgs); + + //all organizations + $sql = "SELECT organizationname FROM vtiger_organizationdetails WHERE deleted=0"; + $result = $adb->query($sql); + $allorgs = array(); + while($org_result = $adb->fetch_array($result)) { + $key = $org_result["organizationname"]; + $allorgs[$key] = ''; + } + $smarty_allorgs = array($allorgs); + + //Organization untis + $orgunits = array(); + $smarty_orgunits = array($orgunits); + + //The remaining field are intentially left blank + $curorg = ""; + $assigned_org = ""; + $prim_orgunits = ""; + $org_separator = "
 "; + + //Set up session variables + $_SESSION['all_user_organizations'] = $smarty_allorgs; + $_SESSION['edit_user_organizations'] = $smarty_orgs; + $_SESSION['edit_user_orgunits'] = $smarty_orgunits; + $_SESSION['edit_user_primary_organization'] = $curorg; + $_SESSION['edit_user_assigned_organization'] = $assigned_org; + $_SESSION['edit_user_primary_orgunits'] = $prim_orgunits; +} + +//In case of edit mode use the predefined gathering fuction +else { + $crmid = $focus->id; + require('modules/Users/GetUserOrg.php'); +} + +//Assign the organization details to the html output +$smarty->assign("MULTISELECT_COMBO_BOX_ITEM_SEPARATOR_STRING", $org_separator); +$smarty->assign("ALL_USER_ORGANIZATIONS", $smarty_allorgs); +$smarty->assign("EDIT_USER_ORGANIZATIONS", $smarty_orgs); +$smarty->assign("EDIT_USER_ORGUNITS", $smarty_orgunits); +$smarty->assign("EDIT_USER_PRIMARY_ORGANIZATION", $curorg); +$smarty->assign("EDIT_USER_ASSIGNED_ORGANIZATIONS", $assigned_org); +$smarty->assign("EDIT_USER_PRIMARY_ORGUNITS", $prim_orgunits); + $smarty->display('UserEditView.tpl'); ?> diff -ruN htdocs.orig/modules/Users/ListView.php htdocs/modules/Users/ListView.php --- htdocs.orig/modules/Users/ListView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/ListView.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,82 +1,82 @@ -query($list_query); -//Retreive the Navigation array -$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); - -$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("CMOD", $mod_strings); -$smarty->assign("APP", $app_strings); -$smarty->assign("CURRENT_USERID", $current_user->id); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("CATEGORY",$category); -$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); -$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); -$smarty->assign("USER_COUNT",$no_of_users); -$smarty->assign("RECORD_COUNTS", $record_string); -$smarty->assign("NAVIGATION", $navigationOutput); -$smarty->assign("USER_IMAGES",getUserImageNames()); -if($_REQUEST['ajax'] !='') - $smarty->display("UserListViewContents.tpl"); -else - $smarty->display("UserListView.tpl"); - -?> +query($list_query); +//Retreive the Navigation array +$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); + +$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("CMOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("CURRENT_USERID", $current_user->id); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("CATEGORY",$category); +$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); +$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); +$smarty->assign("USER_COUNT",$no_of_users); +$smarty->assign("RECORD_COUNTS", $record_string); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("USER_IMAGES",getUserImageNames()); +if($_REQUEST['ajax'] !='') + $smarty->display("UserListViewContents.tpl"); +else + $smarty->display("UserListView.tpl"); + +?> diff -ruN htdocs.orig/modules/Users/Logout.php htdocs/modules/Users/Logout.php --- htdocs.orig/modules/Users/Logout.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Logout.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,109 +1,109 @@ -query($query); - $num_rows = $adb->num_rows($result); - if($num_rows > 0) - { - $ftpserver = $adb->query_result($result,0,'server'); - $ftpuser = $adb->query_result($result,0,'server_username'); - $ftppassword = $adb->query_result($result,0,'server_password'); - } - - //Taking the Backup of DB - $currenttime=date("Ymd_His"); - if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') - { $backupFileName="backup_".$currenttime.".sql"; - save_structure($backupFileName, $root_directory); - $source_file=$backupFileName; - ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); - if(file_exists($source_file)) unlink($source_file); - - } -} -// Recording Logout Info - $usip=$_SERVER['REMOTE_ADDR']; - $outtime=date("Y/m/d H:i:s"); - $loghistory=new LoginHistory(); - $loghistory->user_logout($current_user->user_name,$usip,$outtime); - - -$local_log =& LoggerManager::getLogger('Logout'); - -//Calendar Logout -//include('modules/Calendar/logout.php'); - -// clear out the autthenticating flag -session_destroy(); - -define("IN_LOGIN", true); - -// define('IN_PHPBB', true); -// include($phpbb_root_path . 'extension.inc'); -// include($phpbb_root_path . 'common.'.$phpEx); - -// -// Set page ID for session management -// -//$userdata = session_pagestart($user_ip, PAGE_LOGIN); -//init_userprefs($userdata); -// -// End session management -// - -// session id check -/* -if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) -{ - $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; -} -else -{ - $sid = ''; -} -if( $userdata['session_logged_in'] ) - { - if( $userdata['session_logged_in'] ) - { - session_end($userdata['session_id'], $userdata['user_id']); - } - - } -*/ -// go to the login screen. -header("Location: index.php?action=Login&module=Users"); -?> +query($query); + $num_rows = $adb->num_rows($result); + if($num_rows > 0) + { + $ftpserver = $adb->query_result($result,0,'server'); + $ftpuser = $adb->query_result($result,0,'server_username'); + $ftppassword = $adb->query_result($result,0,'server_password'); + } + + //Taking the Backup of DB + $currenttime=date("Ymd_His"); + if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') + { $backupFileName="backup_".$currenttime.".sql"; + save_structure($backupFileName, $root_directory); + $source_file=$backupFileName; + ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); + if(file_exists($source_file)) unlink($source_file); + + } +} +// Recording Logout Info + $usip=$_SERVER['REMOTE_ADDR']; + $outtime=date("Y/m/d H:i:s"); + $loghistory=new LoginHistory(); + $loghistory->user_logout($current_user->user_name,$usip,$outtime); + + +$local_log =& LoggerManager::getLogger('Logout'); + +//Calendar Logout +//include('modules/Calendar/logout.php'); + +// clear out the autthenticating flag +session_destroy(); + +define("IN_LOGIN", true); + +// define('IN_PHPBB', true); +// include($phpbb_root_path . 'extension.inc'); +// include($phpbb_root_path . 'common.'.$phpEx); + +// +// Set page ID for session management +// +//$userdata = session_pagestart($user_ip, PAGE_LOGIN); +//init_userprefs($userdata); +// +// End session management +// + +// session id check +/* +if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) +{ + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; +} +else +{ + $sid = ''; +} +if( $userdata['session_logged_in'] ) + { + if( $userdata['session_logged_in'] ) + { + session_end($userdata['session_id'], $userdata['user_id']); + } + + } +*/ +// go to the login screen. +header("Location: index.php?action=Login&module=Users"); +?> diff -ruN htdocs.orig/modules/Users/Save.php htdocs/modules/Users/Save.php --- htdocs.orig/modules/Users/Save.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Save.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,168 +1,168 @@ -query($query); - if($adb->num_rows($result) > 0) - { - echo 'User Name Already Exists!'; - die; - }else - { - echo 'SUCCESS'; - die; - } -} - -if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); -elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); - -$focus = new Users(); -if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') -{ - $focus->mode='edit'; - $focus->id = $_REQUEST["record"]; -} -else -{ - $focus->mode=''; -} - - -if($_REQUEST['changepassword'] == 'true') -{ - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); - $focus->id = $_REQUEST['record']; -if (isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $old_pass = $_POST['old_password']; - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -} - - -//save user Image -if(! $_REQUEST['changepassword'] == 'true') -{ - if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - - if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; - //Code contributed by mike crowe for rearrange the home page and tab - if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; - if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; - - setObjectValuesFromRequest(&$focus); - $focus->saveentity("Users"); - //$focus->imagename = $image_upload_array['imagename']; - $focus->saveHomeOrder($focus->id); - $return_id = $focus->id; - -if (isset($_POST['user_name']) && isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -if(isset($focus->id) && $focus->id != '') -{ - - if(isset($_POST['user_role'])) - { - updateUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name']) && $_POST['group_name'] != '') - { - updateUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} -else -{ - if(isset($_POST['user_role'])) - { - insertUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name'])) - { - insertUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} - -//Creating the Privileges Flat File -require_once('modules/Users/CreateUserPrivilegeFile.php'); -createUserPrivilegesfile($focus->id); -createUserSharingPrivilegesfile($focus->id); - -} -if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; -else $return_module = "Users"; -if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; -else $return_action = "DetailView"; -if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; -if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; -if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; - -$log->debug("Saved record with id of ".$return_id); - - - -if($_REQUEST['modechk'] == 'prefview') - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); -else - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); - - -?> +query($query); + if($adb->num_rows($result) > 0) + { + echo 'User Name Already Exists!'; + die; + }else + { + echo 'SUCCESS'; + die; + } +} + +if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); +elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); + +$focus = new Users(); +if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') +{ + $focus->mode='edit'; + $focus->id = $_REQUEST["record"]; +} +else +{ + $focus->mode=''; +} + + +if($_REQUEST['changepassword'] == 'true') +{ + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->id = $_REQUEST['record']; +if (isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $old_pass = $_POST['old_password']; + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +} + + +//save user Image +if(! $_REQUEST['changepassword'] == 'true') +{ + if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + + if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; + //Code contributed by mike crowe for rearrange the home page and tab + if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; + if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; + + setObjectValuesFromRequest(&$focus); + $focus->saveentity("Users"); + //$focus->imagename = $image_upload_array['imagename']; + $focus->saveHomeOrder($focus->id); + $return_id = $focus->id; + +if (isset($_POST['user_name']) && isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +if(isset($focus->id) && $focus->id != '') +{ + + if(isset($_POST['user_role'])) + { + updateUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name']) && $_POST['group_name'] != '') + { + updateUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} +else +{ + if(isset($_POST['user_role'])) + { + insertUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name'])) + { + insertUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} + +//Creating the Privileges Flat File +require_once('modules/Users/CreateUserPrivilegeFile.php'); +createUserPrivilegesfile($focus->id); +createUserSharingPrivilegesfile($focus->id); + +} +if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; +else $return_module = "Users"; +if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; +else $return_action = "DetailView"; +if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; +if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; +if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; + +$log->debug("Saved record with id of ".$return_id); + + + +if($_REQUEST['modechk'] == 'prefview') + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); +else + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); + + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Products/Delete.php htdocs/modules/Products/Delete.php --- htdocs.orig/modules/Products/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/Delete.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,40 +1,40 @@ - + diff -ruN htdocs.orig/modules/Products/DetailViewAjax.php htdocs/modules/Products/DetailViewAjax.php --- htdocs.orig/modules/Products/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/DetailViewAjax.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Products"); - $modObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'unit_price')//unit price converted to dollar value while saving - { - $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Products"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Products"); + $modObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'unit_price')//unit price converted to dollar value while saving + { + $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Products"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php --- htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 01:04:34.000000000 +0200 @@ -1,125 +1,125 @@ -$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries - */ -function getTopPurchaseOrder() -{ - require_once("data/Tracker.php"); - require_once('modules/PurchaseOrder/PurchaseOrder.php'); - require_once('include/logging.php'); - require_once('include/ListView/ListView.php'); - require_once('include/database/PearDatabase.php'); - require_once('include/ComboUtil.php'); - require_once('include/utils/utils.php'); - require_once('modules/CustomView/CustomView.php'); - - global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; - $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); - - $log = LoggerManager::getLogger('po_list'); - - $url_string = ''; - $sorder = ''; - $oCustomView = new CustomView("PurchaseOrder"); - $customviewcombo_html = $oCustomView->getCustomViewCombo(); - if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') - { - if($oCustomView->setdefaultviewid != "") - { - $viewid = $oCustomView->setdefaultviewid; - }else - { - $viewid = "0"; - } - } - $focus = new PurchaseOrder(); - - $theme_path="themes/".$theme."/"; - $image_path=$theme_path."images/"; - - //Retreive the list from Database - //<<<<<<<<>>>>>>>> - $date_var = date('Y-m-d'); - - $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; - $query = getListQuery("PurchaseOrder",$where); - $query .=" ORDER BY total DESC"; - - //<<<<<<<>>>>>>>> - - $list_result = $adb->limitQuery($query,0,5); - - //Retreiving the no of rows - $noofrows = $adb->num_rows($list_result); - - //Retreiving the start value from request - if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') - { - $start = $_REQUEST['start']; - } - else - { - - $start = 1; - } - - //Retreive the Navigation array - $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); - - if ($navigation_array['start'] == 1) - { - if($noofrows != 0) - $start_rec = $navigation_array['start']; - else - $start_rec = 0; - if($noofrows > $list_max_entries_per_page) - { - $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; - } - else - { - $end_rec = $noofrows; - } - - } - else - { - if($navigation_array['next'] > $list_max_entries_per_page) - { - $start_rec = $navigation_array['next'] - $list_max_entries_per_page; - $end_rec = $navigation_array['next'] - 1; - } - else - { - $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; - $end_rec = $noofrows; - } - } - - - //Retreive the List View Table Header - $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); - $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); - - $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); - $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); - if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) - return $values; -} -?> - +$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries + */ +function getTopPurchaseOrder() +{ + require_once("data/Tracker.php"); + require_once('modules/PurchaseOrder/PurchaseOrder.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + require_once('include/database/PearDatabase.php'); + require_once('include/ComboUtil.php'); + require_once('include/utils/utils.php'); + require_once('modules/CustomView/CustomView.php'); + + global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; + $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); + + $log = LoggerManager::getLogger('po_list'); + + $url_string = ''; + $sorder = ''; + $oCustomView = new CustomView("PurchaseOrder"); + $customviewcombo_html = $oCustomView->getCustomViewCombo(); + if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') + { + if($oCustomView->setdefaultviewid != "") + { + $viewid = $oCustomView->setdefaultviewid; + }else + { + $viewid = "0"; + } + } + $focus = new PurchaseOrder(); + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + //Retreive the list from Database + //<<<<<<<<>>>>>>>> + $date_var = date('Y-m-d'); + + $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; + $query = getListQuery("PurchaseOrder",$where); + $query .=" ORDER BY total DESC"; + + //<<<<<<<>>>>>>>> + + $list_result = $adb->limitQuery($query,0,5); + + //Retreiving the no of rows + $noofrows = $adb->num_rows($list_result); + + //Retreiving the start value from request + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + { + $start = $_REQUEST['start']; + } + else + { + + $start = 1; + } + + //Retreive the Navigation array + $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); + + if ($navigation_array['start'] == 1) + { + if($noofrows != 0) + $start_rec = $navigation_array['start']; + else + $start_rec = 0; + if($noofrows > $list_max_entries_per_page) + { + $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; + } + else + { + $end_rec = $noofrows; + } + + } + else + { + if($navigation_array['next'] > $list_max_entries_per_page) + { + $start_rec = $navigation_array['next'] - $list_max_entries_per_page; + $end_rec = $navigation_array['next'] - 1; + } + else + { + $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; + $end_rec = $noofrows; + } + } + + + //Retreive the List View Table Header + $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); + $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); + + $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); + $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); + if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) + return $values; +} +?> + -------------- next part -------------- diff -ruN htdocs.orig/modules/Potentials/language/en_us.lang.php htdocs/modules/Potentials/language/en_us.lang.php --- htdocs.orig/modules/Potentials/language/en_us.lang.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Potentials/language/en_us.lang.php 2007-05-09 01:05:32.000000000 +0200 @@ -1,153 +1,153 @@ -'Potentials', -'LBL_MODULE_TITLE'=>'Potentials: Home', -'LBL_SEARCH_FORM_TITLE'=>'Potential Search', -'LBL_LIST_FORM_TITLE'=>'Potential List', -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_OPPORTUNITY'=>'Potential:', -'LBL_NAME'=>'Potential Name', -'LBL_INVITEE'=>'Contacts', -'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_PRODUCT_NAME'=>'Product Name', -'LBL_LIST_AMOUNT'=>'Amount', -'LBL_LIST_DATE_CLOSED'=>'Expected Close', -'LBL_LIST_SALES_STAGE'=>'Sales Stage', - -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_AMOUNT'=>'Amount:', -'LBL_DATE_CLOSED'=>'Expected Close Date:', -'LBL_TYPE'=>'Type:', -'LBL_NEXT_STEP'=>'Next Step:', -'LBL_LEAD_SOURCE'=>'Lead Source:', -'LBL_SALES_STAGE'=>'Sales Stage:', -'LBL_PROBABILITY'=>'Probability (%):', -'LBL_DESCRIPTION'=>'Description:', -'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', - -'LBL_NEW_FORM_TITLE'=>'New Potential', - -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", -'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", - -'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', - -'NTC_NONE_SCHEDULED'=>'None scheduled.', - -'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', -'LBL_GENERAL_INFORMATION'=>'General Information', - - - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_NOTE'=>'New Note', -'LBL_NOTE_TITLE'=>'Notes', - -'LBL_NEW_ATTACHMENT'=>'New Attachment', -'LBL_ATTACHMENT_TITLE'=>'Attachments', - -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_WON'=>'Won', -'LBL_LOST'=>'Lost', -'LBL_VALUE_PROPOSITION'=>'Value Proposition', -'LBL_PROSPECTING'=>'Prospecting', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Potential Tools', -//Added for 4GA -'Potential Name'=>'Potential Name', -'Amount'=>'Amount', -'Account Name'=>'Account Name', -'Currency'=>'Currency', -'Expected Close Date'=>'Expected Close Date', -'Opportunity Type'=>'Opportunity Type', -'Type'=>'Type', -'Next Step'=>'Next Step', -'Lead Source'=>'Lead Source', -'Sales Stage'=>'Sales Stage', -'Assigned To'=>'Assigned To', -'Probability'=>'Probability (%)', -'Campaign Source'=>'Campaign Source', -'Description'=>'Description', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Organization unit'=>'Organization unit', -//Added for 4.2 Release -- CustomView -'Potential'=>'Potential', -'Expected Close'=>'Expected Close', - -//Added for Existing Picklist Strings - -'Prospecting'=>'Prospecting', -'Qualification'=>'Qualification', -'Needs Analysis'=>'Needs Analysis', -'Value Proposition'=>'Value Proposition', -'Id. Decision Makers'=>'Id. Decision Makers', -'Perception Analysis'=>'Perception Analysis', -'Proposal/Price Quote'=>'Proposal/Price Quote', -'Negotiation/Review'=>'Negotiation/Review', -'Closed Won'=>'Closed Won', -'Closed Lost'=>'Closed Lost', - -'Cold Call'=>'Cold Call', -'Existing Customer'=>'Existing Customer', -'Self Generated'=>'Self Generated', -'Employee'=>'Employee', -'Partner'=>'Partner', -'Public Relations'=>'Public Relations', -'Direct Mail'=>'Direct Mail', -'Conference'=>'Conference', -'Trade Show'=>'Trade Show', -'Web Site'=>'Web Site', -'Word of mouth'=>'Word of mouth', -'Other'=>'Other', - -'--None--'=>'--None--', -'Existing Business'=>'Existing Business', -'New Business'=>'New Business', - - - -); - -?> +'Potentials', +'LBL_MODULE_TITLE'=>'Potentials: Home', +'LBL_SEARCH_FORM_TITLE'=>'Potential Search', +'LBL_LIST_FORM_TITLE'=>'Potential List', +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_OPPORTUNITY'=>'Potential:', +'LBL_NAME'=>'Potential Name', +'LBL_INVITEE'=>'Contacts', +'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_PRODUCT_NAME'=>'Product Name', +'LBL_LIST_AMOUNT'=>'Amount', +'LBL_LIST_DATE_CLOSED'=>'Expected Close', +'LBL_LIST_SALES_STAGE'=>'Sales Stage', + +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_AMOUNT'=>'Amount:', +'LBL_DATE_CLOSED'=>'Expected Close Date:', +'LBL_TYPE'=>'Type:', +'LBL_NEXT_STEP'=>'Next Step:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_SALES_STAGE'=>'Sales Stage:', +'LBL_PROBABILITY'=>'Probability (%):', +'LBL_DESCRIPTION'=>'Description:', +'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +'LBL_NEW_FORM_TITLE'=>'New Potential', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", +'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", + +'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', + +'NTC_NONE_SCHEDULED'=>'None scheduled.', + +'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', +'LBL_GENERAL_INFORMATION'=>'General Information', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Note', +'LBL_NOTE_TITLE'=>'Notes', + +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_ATTACHMENT_TITLE'=>'Attachments', + +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_WON'=>'Won', +'LBL_LOST'=>'Lost', +'LBL_VALUE_PROPOSITION'=>'Value Proposition', +'LBL_PROSPECTING'=>'Prospecting', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Potential Tools', +//Added for 4GA +'Potential Name'=>'Potential Name', +'Amount'=>'Amount', +'Account Name'=>'Account Name', +'Currency'=>'Currency', +'Expected Close Date'=>'Expected Close Date', +'Opportunity Type'=>'Opportunity Type', +'Type'=>'Type', +'Next Step'=>'Next Step', +'Lead Source'=>'Lead Source', +'Sales Stage'=>'Sales Stage', +'Assigned To'=>'Assigned To', +'Probability'=>'Probability (%)', +'Campaign Source'=>'Campaign Source', +'Description'=>'Description', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Organization unit'=>'Organization unit', +//Added for 4.2 Release -- CustomView +'Potential'=>'Potential', +'Expected Close'=>'Expected Close', + +//Added for Existing Picklist Strings + +'Prospecting'=>'Prospecting', +'Qualification'=>'Qualification', +'Needs Analysis'=>'Needs Analysis', +'Value Proposition'=>'Value Proposition', +'Id. Decision Makers'=>'Id. Decision Makers', +'Perception Analysis'=>'Perception Analysis', +'Proposal/Price Quote'=>'Proposal/Price Quote', +'Negotiation/Review'=>'Negotiation/Review', +'Closed Won'=>'Closed Won', +'Closed Lost'=>'Closed Lost', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', +'Other'=>'Other', + +'--None--'=>'--None--', +'Existing Business'=>'Existing Business', +'New Business'=>'New Business', + + + +); + +?> -------------- next part -------------- diff -ruN htdocs.orig/parent_tabdata.php htdocs/parent_tabdata.php --- htdocs.orig/parent_tabdata.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/parent_tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,13 +1,21 @@ 'My Home Page',2=>'Marketing',3=>'Sales',4=>'Support',5=>'Analytics',6=>'Inventory',7=>'Tools',8=>'Settings'); -$parent_child_tab_rel_array=array(1=>array(3,9,28,),2=>array(26,6,4,28,7,9,8,),3=>array(7,6,4,2,20,22,23,14,19,8,9,),4=>array(13,15,6,4,14,8,28,9,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(30,31,),); +$parent_child_tab_rel_array=array(1=>array(3,9,10,),2=>array(26,6,4,),3=>array(7,6,4,2,20,22,23,14,19,8,),4=>array(13,15,6,4,14,8,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(),); -?> \ No newline at end of file +?> diff -ruN htdocs.orig/tabdata.php htdocs/tabdata.php --- htdocs.orig/tabdata.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,15 +1,17 @@ 3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,'Organization'=>30,'OrgUnit'=>31,); - -$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,'29'=>0,'30'=>0,'31'=>0,); - -$tab_ownedby_array=array('3'=>1,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>1,'9'=>0,'10'=>1,'13'=>0,'14'=>1,'1'=>1,'15'=>1,'16'=>0,'18'=>1,'19'=>1,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>1,'25'=>1,'26'=>0,'27'=>1,'28'=>1,'29'=>1,'30'=>0,'31'=>0,); - -$action_id_array=array('Save'=>0,'EditView'=>1,'Delete'=>2,'index'=>3,'DetailView'=>4,'Import'=>5,'Export'=>6,'Merge'=>8,'VendorEditView'=>1,'VendorDetailView'=>4,'SaveVendor'=>0,'DeleteVendor'=>2,'PriceBookEditView'=>1,'PriceBookDetailView'=>4,'SavePriceBook'=>0,'DeletePriceBook'=>2,'ConvertLead'=>9,'DetailViewAjax'=>1,'TagCloud'=>4,'QuickCreate'=>1,'Popup'=>3); +$tab_info_array=array('Home'=>3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,); -$action_name_array=array(0=>'Save',1=>'EditView',2=>'Delete',3=>'index',4=>'DetailView',5=>'Import',6=>'Export',8=>'Merge',9=>'ConvertLead'); -?> \ No newline at end of file +$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,); +?> -------------- next part -------------- diff -ruN htdocs.orig/themes/alphagrey/header.php htdocs/themes/alphagrey/header.php --- htdocs.orig/themes/alphagrey/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/alphagrey/header.php 2007-05-09 01:56:53.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/bluelagoon/header.php htdocs/themes/bluelagoon/header.php --- htdocs.orig/themes/bluelagoon/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/bluelagoon/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/woodspice/header.php htdocs/themes/woodspice/header.php --- htdocs.orig/themes/woodspice/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/woodspice/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> From weigelt at metux.de Thu May 10 11:20:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:20:49 +0200 Subject: [Vtigercrm-developers] [PATCH] __toString() fix Message-ID: <20070510152049.GB25395@nibiru.local> Hi folks, there were some __toString() methods necessary ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN cleaned/data/CRMEntity.php working/data/CRMEntity.php --- cleaned/data/CRMEntity.php 2007-05-03 17:50:00.000000000 +0200 +++ working/data/CRMEntity.php 2007-05-03 23:38:06.000000000 +0200 @@ -25,10 +25,16 @@ require_once('data/Tracker.php'); require_once('include/utils/utils.php'); require_once('include/utils/UserInfoUtil.php'); - -class CRMEntity -{ - /** + +class CRMEntity +{ + /* generic toString() method added by nekrad */ + function __toString() + { + return serialize($this); + } + + /** * This method implements a generic insert and update logic for any SugarBean * This method only works for subclasses that implement the same variable names. * This method uses the presence of an id vtiger_field that is not null to signify and update. diff -ruN cleaned/modules/Users/Users.php working/modules/Users/Users.php --- cleaned/modules/Users/Users.php 2007-05-04 02:32:05.000000000 +0200 +++ working/modules/Users/Users.php 2007-05-04 02:59:03.000000000 +0200 @@ -163,6 +163,11 @@ $this->log->debug("Exiting Users() method ..."); } + function __toString() + { + return "[[USERS]]"; + } + // Mike Crowe Mod --------------------------------------------------------Default ordering for us /** * Function to get sort order From weigelt at metux.de Thu May 10 11:21:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:21:41 +0200 Subject: [Vtigercrm-developers] [PATCH] remove noise in invoice module Message-ID: <20070510152141.GC25395@nibiru.local> Hi folks, this patch removes some noise in the invoice module ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/js/Inventory.js htdocs/include/js/Inventory.js --- orig/include/js/Inventory.js 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/js/Inventory.js 2007-05-08 21:51:32.000000000 +0200 @@ -225,8 +225,8 @@ var max_row_count = document.getElementById('proTab').rows.length; max_row_count = eval(max_row_count)-2;//As the table has two header rows, we will reduce two from table row length - if(!FindDuplicate()) - return false; +// if(!FindDuplicate()) +// return false; if(max_row_count == 0) { @@ -357,12 +357,12 @@ } } } - if(duplicate) - { - //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); - if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) - return false; - } +// if(duplicate) +// { +// //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); +// if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) +// return false; +// } return true; } From weigelt at metux.de Thu May 10 11:26:38 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:26:38 +0200 Subject: [Vtigercrm-developers] [PATCH] render API v1 Message-ID: <20070510152638.GD25395@nibiru.local> Hi folks, here're some patches to introduce my new preprint rendering API. For now there's just an latex backend, but adding more should be quite simple. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/lib/render/README htdocs/lib/render/README --- htdocs.orig/lib/render/README 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/README 2007-05-09 13:53:10.000000000 +0200 @@ -0,0 +1 @@ +This subdirectory contains the TeX rendering stuff. diff -ruN htdocs.orig/lib/render/RenderFactory.php htdocs/lib/render/RenderFactory.php --- htdocs.orig/lib/render/RenderFactory.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/RenderFactory.php 2007-05-09 17:05:57.000000000 +0200 @@ -0,0 +1,64 @@ +engine = $e; + } + + function __toString() + { + return "Unknown Engine: \"".$this->engine."\""; + } +} + +class E_Render_FormatNotSupportedByEngine extends Exception +{ + var $engine; + var $format; + + function E_Render_FormatNotSupportedByEngine($format,$engine) + { + $this->format = $format; + $this->engine = $engine; + } + + function __toString() + { + return "Format \"".$this->format. + "\" not supported by engine \"". + $this->engine. + "\""; + } +} + +class RenderFactory +{ + /* public static */ function getRenderer_Invoice($param) + { + if (!($f = $param{'format'})) + throw new Exception("missing output format"); + if (!($e = $param{'engine'})) + throw new Exception("missing engine"); + + switch ($e) + { + case 'pdflatex': + { + if ($f != 'application/pdf') + throw new E_Render_FormatNotSupportedByEngine($f,$e); + + require_once(RENDER_LIB_PREFIX.'TexRender_Invoice.php'); + return new TexRender_Invoice($param); + } + default: + throw new E_Render_UnknownEngine($e); + } + } +} diff -ruN htdocs.orig/lib/render/TexEncode.php htdocs/lib/render/TexEncode.php --- htdocs.orig/lib/render/TexEncode.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/TexEncode.php 2007-05-10 02:51:50.000000000 +0200 @@ -0,0 +1,101 @@ + + +*/ + +// NOTE: the webserver needs *write* acccess to this directory +// we normally take the session storage dir +define('TEXRENDER_TMP_MASK', '{SESSION.SAVE_PATH}/texrender-{SESSION.ID}-{NAME}'); +define('TEXRENDER_TEMPLATE_DIR', 'templates/tex/{TEMPLATE-NAME}/'); + +require_once(RENDER_LIB_PREFIX.'TexEncode.php'); + +class TexRender_Invoice +{ + /* private */ var $tmpmask; + /* private */ var $data; + /* private */ var $product_items; + /* private */ var $fn_tex; + /* private */ var $fn_pdf; + /* private */ var $fn_template; + /* private */ var $key; + + /* private */ function _tmpname($name) + { + return str_replace('{SESSION.NAME}', session_name(), + str_replace('{SESSION.ID}', session_id(), + str_replace('{SESSION.SAVE_PATH}', realpath(ini_get('session.save_path')), + str_replace('{NAME}', $name, + $this->tmpmask + )))); + } + + /* private */ function _test_write_access() + { + $fn = $this->_tmpname('write-test'); + if (!($fp=fopen($fn,"w"))) + throw new Exception("write-test: could not open file for writing: $fn"); + fputs($fp,"TEST123"); + fclose($fp); + + $res = trim(implode('',file($fn))); + if ($res != "TEST123") + throw new Exception("write-test: reading test data failed for file: $fn"); + + unlink($fn); + + return true; + } + + function TexRender_Invoice($param) + { + // test write access and otherwise failed + $this->tmpmask = TEXRENDER_TMP_MASK; + + // should be already cought by the factory, but just to be sure + if ($param{'format'} != 'application/pdf') + throw new Exception("fomat not supported by this renderer: ".$param{'format'}); + + if (!$param{'template'}) + throw new Exception("missing template name"); + + $this->template_name = $param{'template'}; + $this->data = array(); + $this->_test_write_access(); + $this->key = md5(serialize(gettimeofday)); + $this->fn_tex = $this->_tmpname($this->key.'.tex'); + $this->fn_pdf = $this->_tmpname($this->key.'.pdf'); + $this->template_dir= realpath(str_replace('{TEMPLATE-NAME}', $this->template_name,TEXRENDER_TEMPLATE_DIR)); + $this->fn_template_main = $this->template_dir.'/invoice/main.texi'; + $this->fn_template_item = $this->template_dir.'/invoice/item.texi'; + + $inc = $this->template_dir.'/config.php'; + if (!include($inc)) + throw new Exception("could not load config: $inc"); + + if (!is_array($this->config = $tex_template_config)) + throw new Exception("missing template config"); + + if (!$this->config{'lang'}) + throw new Exception("language not set in template config"); + } + + function addData($par) + { + foreach($par as $walk => $cur) + $this->data{$walk} = $cur; + } + + function checkProductItem($item) + { + if (!$item{'name'}) + throw new Exception("missing item name"); + if (!$item{'amount'}) + throw new Exception("missing amount"); + if (!is_numeric($item{'amount'})) + throw new Exception("amount must be numeric"); + if (!$item{'price'}) + throw new Exception("missing price"); + if (!is_numeric($item{'price'})) + throw new Exception("price must be numeric"); + if (($item{'discount'})&&($item{'discount'} != 0)) + throw new Exception("discount not supported yet by this renderer"); + if (!is_numeric($item{'tax_percent'})) + throw new Exception("tax_percent must be numeric"); + } + + function checkData() + { + if ((!is_array($this->_product_items)) || + (!count($this->_product_items))) + throw new Exception("no product items"); + + if (!$this->data{'ident'}) + throw new Exception("missing ident"); + } + + /* public */ function addProductItem($item) + { + // check for correct items + $this->checkProductItem($item); + + // calculate some stuff if necessary + if (!$item{'total'}) + $item{'total'} = $item{'price'} * $item{'amount'}; + if (!$item{'taxes'}) + $item{'taxes'} = $item{'total'} * $item{'tax_percent'}; + if (!$item{'topay'}) + $item{'topay'} = $item{'total'} + $item{'taxes'}; + + $this->_product_items[] = $item; + } + + /* public String */ function getOutputContentType() + { + return 'application/pdf'; + } + + /* private String */ function _generate_tex() + { + if (!($tmpl_main = implode('',file($this->fn_template_main)))) + throw new Exception("could not load main template: ".$this->fn_template_main); + if (!($tmpl_item = implode('',file($this->fn_template_item)))) + throw new Exception("could not load item template: ".$this->fn_template_item); + + // generate the item list + foreach ($this->_product_items as $walk => $cur) + { + $items .= + str_replace('::Item:Name::', $cur{'name'}, + str_replace('::Item:Price::', TexEncode::money($cur{'price'}), + str_replace('::Item:Amount::', $cur{'amount'}, + str_replace('::Item:Taxrate::', $cur{'tax_percent'}, + str_replace('::Item:Description::', $cur{'description'}, + str_replace('::Item:Comment::', trim($cur{'comment'}), + str_replace('::Item:Discount::', TexEncode::money($cur{'discount'}), + str_replace('::Item:Total::', TexEncode::money($cur{'total'}), + str_replace('::Item:Taxes::', TexEncode::money($cur{'taxes'}), + str_replace('::Item:Topay::', TexEncode::money($cur{'topay'}), + $tmpl_item)))))))))); + + $all_total += $cur{'total'}; + $all_taxes += $cur{'taxes'}; + $all_topay += $cur{'topay'}; + } + + $content = + str_replace('::TemplateDir::', $this->template_dir, + str_replace('::Items::', $items, + str_replace('::Bill:Ident::', $this->data{'ident'}, + str_replace('::Bill:Total::', TexEncode::money($all_total), + str_replace('::Bill:Taxes::', TexEncode::money($all_taxes), + str_replace('::Bill:Topay::', TexEncode::money($all_topay), + str_replace('::Company:Addr:Street::', $this->data{'company:addr:street'}, + str_replace('::Company:Addr:PCode::', $this->data{'company:addr:pcode'}, + str_replace('::Company:Addr:City::', $this->data{'company:addr:city'}, + str_replace('::Company:Addr:Country::', $this->data{'company:addr:country'}, + str_replace('::Company:Addr:State::', $this->data{'company:addr:state'}, + str_replace('::Company:Phone::', $this->data{'company:phone'}, + str_replace('::Company:Fax::', $this->data{'company:fax'}, + str_replace('::Company:Website::', $this->data{'company:website'}, + str_replace('::Customer:Name::', $this->data{'customer:name'}, + str_replace('::Customer:Addr:Street::', TexEncode::text($this->data{'billing:addr:street'}), + str_replace('::Customer:Addr:PCode::', TexEncode::text($this->data{'billing:addr:pcode'}), + str_replace('::Customer:Addr:City::', TexEncode::text($this->data{'billing:addr:city'}), + str_replace('::Customer:Addr:State::', TexEncode::text($this->data{'billing:addr:state'}), + str_replace('::Customer:Addr:Country::', TexEncode::text($this->data{'billing:addr:country'}), + $tmpl_main)))))))))))))))))))); + + return $content; + } + + /* public */ function generate() + { + $this->checkData(); + $tex = $this->_generate_tex(); + @unlink($this->fn_tex); + if (!($fp_tex = fopen($this->fn_tex,"w"))) + throw new Exception("could not open tex source file: ".$this->fn_tex); + + fputs($fp_tex,$tex); + fclose($fp_tex); + + $cmd = 'cd '.dirname($this->fn_tex).' && pdflatex '.$this->fn_tex; + `$cmd` ; `$cmd` ; // call it twice for table calculations + } + + // send appropriate http headers and output file + /* public */ function sendHTTPOutput() + { + $this->generate(); + Header("Content-Type: ".$this->getOutputContentType()); + readfile($this->fn_pdf); + } +} -------------- next part -------------- diff -ruN htdocs.orig/modules/Invoice/CreatePDF.php htdocs/modules/Invoice/CreatePDF.php --- htdocs.orig/modules/Invoice/CreatePDF.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Invoice/CreatePDF.php 2007-05-10 15:30:08.000000000 +0200 @@ -9,67 +9,36 @@ * ********************************************************************************/ - -require_once('include/fpdf/pdf.php'); -require_once('include/fpdf/pdfconfig.php'); require_once('modules/Invoice/Invoice.php'); require_once('modules/Organization/Organization.php'); require_once('include/database/PearDatabase.php'); require_once('include/utils/EditViewUtils.php'); +require_once('lib/render/RenderFactory.php'); -global $adb,$app_strings,$focus; -global $log; - -// for template checking ... -$tmpl_dirs = array( "firstpage", "pages", "lastpage"); -$tmpl_files = array( "header.php", "body.php", "footer.php"); +global $adb,$app_strings,$focus,$log; $sql="select currency_symbol from vtiger_currency_info"; $result = $adb->query($sql); $currency_symbol = $adb->query_result($result,0,'currency_symbol'); -// would you like and end page? 1 for yes 0 for no -$endpage="1"; - $id = $_REQUEST['record']; //retreiving the vtiger_invoice info $focus = new Invoice(); $focus->retrieve_entity_info($_REQUEST['record'],"Invoice"); -$account_name = getAccountName($focus->column_fields[account_id]); -$invoice_no = $focus->column_fields[invoice_no]; // **************** BEGIN POPULATE DATA ******************** - -// populate data if($focus->column_fields["salesorder_id"] != '') $so_name = getSoName($focus->column_fields["salesorder_id"]); else $so_name = ''; $po_name = $focus->column_fields["purchaseorder"]; -$valid_till = $focus->column_fields["duedate"]; -$valid_till = getDisplayDate($valid_till); -$bill_street = $focus->column_fields["bill_street"]; -$bill_city = $focus->column_fields["bill_city"]; -$bill_state = $focus->column_fields["bill_state"]; -$bill_code = $focus->column_fields["bill_code"]; -$bill_country = $focus->column_fields["bill_country"]; - -$contact_name =getContactName($focus->column_fields["contact_id"]); -$ship_street = $focus->column_fields["ship_street"]; -$ship_city = $focus->column_fields["ship_city"]; -$ship_state = $focus->column_fields["ship_state"]; -$ship_code = $focus->column_fields["ship_code"]; -$ship_country = $focus->column_fields["ship_country"]; - -$conditions = from_html($focus->column_fields["terms_conditions"]); -$description = from_html($focus->column_fields["description"]); -$status = $focus->column_fields["invoicestatus"]; - // Company information -$crmid = $focus->column_fields["record_id"]; +if (!($crmid = $focus->column_fields["record_id"])) + throw new Exception("crmid is null/empty"); + $org_query = "select organizationname from vtiger_entity2org where crmid='".$crmid."'"; $result = $adb->query($org_query); $org_rows = $adb->num_rows($result); @@ -82,7 +51,7 @@ $org_name = $adb->query_result($result,0,"organizationname"); } else { $log->info( $module. " '".$crmid."' not assigned to any organization"); - exit(); + throw new Exception("crmid $crmid not assigned to any organisation (org_name=$org_name)"); } // get organization/orgunit details @@ -92,68 +61,11 @@ $log->debug( "Here we are: getOrgUnits( $organization, $orgunitid);"); $orgunittab = getOrgUnits( $organization, $orgunitid); -if( is_array( $orgunittab[$orgunitid])) { - $orgdetails = $orgunittab[$orgunitid]; - $org_name = $orgdetails["name"]; - $org_address = $orgdetails["address"]; - $org_city = $orgdetails["city"]; - $org_state = $orgdetails["state"]; - $org_country = $orgdetails["country"]; - $org_code = $orgdetails["code"]; - $org_phone = $orgdetails["phone"]; - $org_fax = $orgdetails["fax"]; - $org_website = $orgdetails["website"]; - $logo_name = $orgdetails["logoname"]; - $template = $orgdetails["invoice_template"]; -} else { - $log->info( $module. " '".$crmid."' organization/orgunitid mismatch"); - exit(); -} - -// Check the template -if( $template == "") - $template = "Default"; - -if( $template != "Default") { - foreach( $tmpl_dirs as $dir) { - foreach( $tmpl_files as $file) { - if( !file_exists( "modules/".$module."/pdf_templates/".$template."/".$dir."/".$file)) { - $log->info( $module. " '".$crmid."' organization/orgunitid template '".$template."' is incomplete"); - $log->info("Missing file: modules/".$module."/pdf_templates/".$template."/".$dir."/".$file); - $log->info("Fallback to the Default template"); - $template = "Default"; - break 2; - } - } - } -} -//NOTE : Removed currency symbols and added with Grand Total text. it is enough to show the currency symbol in one place - -//we can also get the NetTotal, Final Discount Amount/Percent, Adjustment and GrandTotal from the array $associated_products[1]['final_details'] - -//getting the Net Total -$price_subtotal = number_format($focus->column_fields["hdnSubTotal"],2,'.',','); - -//Final discount amount/percentage -$discount_amount = $focus->column_fields["hdnDiscountAmount"]; -$discount_percent = $focus->column_fields["hdnDiscountPercent"]; - -if($discount_amount != "") - $price_discount = number_format($discount_amount,2,'.',','); -else if($discount_percent != "") -{ - //This will be displayed near Discount label - used in include/fpdf/templates/body.php - $final_price_discount_percent = "(".number_format($discount_percent,2,'.',',')." %)"; - $price_discount = number_format((($discount_percent*$focus->column_fields["hdnSubTotal"])/100),2,'.',','); -} -else - $price_discount = "0.00"; - -//Adjustment -$price_adjustment = number_format($focus->column_fields["txtAdjustment"],2,'.',','); -//Grand Total -$price_total = number_format($focus->column_fields["hdnGrandTotal"],2,'.',','); +if(!is_array( $orgunittab[$orgunitid])) + throw new Exception("org/orgunitid mismatch"); +$orgdetails = $orgunittab[$orgunitid]; +$template = $orgdetails["invoice_template"]; //get the Associated Products for this Invoice $focus->id = $focus->column_fields["record_id"]; @@ -166,6 +78,8 @@ //To calculate the group tax amount if($final_details['taxtype'] == 'group') { + throw new Exception("group tax not supported"); + $group_tax_total = $final_details['tax_totalamount']; $price_salestax = number_format($group_tax_total,2,'.',','); @@ -191,47 +105,37 @@ $sh_tax_amount = $final_details['shtax_totalamount']; $price_shipping_tax = number_format($sh_tax_amount,2,'.',','); +$render = RenderFactory::getRenderer_Invoice(array +( + format => 'application/pdf', + engine => 'pdflatex', + template => 'default' +)); //This is to get all prodcut details as row basis -for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++) +for($i=1;$i<=$num_products;$i++) { - $product_name[$i] = $associated_products[$i]['productName'.$i]; - $prod_description[$i] = $associated_products[$i]['productDescription'.$i]; - $product_id[$i] = $associated_products[$i]['hdnProductId'.$i]; - $qty[$i] = $associated_products[$i]['qty'.$i]; - $unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',','); - $list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',','); - $list_pricet[$i] = $associated_products[$i]['listPrice'.$i]; - $discount_total[$i] = $associated_products[$i]['discountTotal'.$i]; - //aded for 5.0.3 pdf changes - $product_code[$i] = $associated_products[$i]['hdnProductcode'.$i]; - - $taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i]; - - $producttotal = $taxable_total; - $total_taxes = '0.00'; if($focus->column_fields["hdnTaxType"] == "individual") { - $total_tax_percent = '0.00'; - //This loop is to get all tax percentage and then calculate the total of all taxes - for($tax_count=0;$tax_countaddProductItem(array + ( + code => $associated_products[$i]['hdnProductcode'.$i], + name => $associated_products[$i]['productName'.$i], + amount => $associated_products[$i]['qty'.$i], + price => $associated_products[$i]['listPrice'.$i], + unit_price => $associated_products[$i]['unitPrice'.$i], + discount => $associated_products[$i]['discountTotal'.$i], + tax_percent => (integer)($tax_percent)/100, + description => $associated_products[$i]['productDescription'.$i], + comment => $associated_products[$i]['comment'.$i] + )); // Product piecelists $query = "SELECT vtiger_crmentity.crmid, @@ -245,86 +149,46 @@ INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid WHERE vtiger_crmentity.deleted = 0 - AND vtiger_products2products_rel.productid = ".$product_id[$i]." + AND vtiger_products2products_rel.productid = ".$product_id." AND vtiger_products2products_rel.relation_type = 10"; $result = $adb->query($query); $pieces = $adb->num_rows($result); if( $pieces > 0) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = "consisting of:"; - $product_line[$j]["Qty"] = ""; - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - for( $pl=0; $pl<$pieces; $pl++) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = - $adb->query_result( $result, $pl, "productname"); - $product_line[$j]["Qty"] = - $adb->query_result( $result, $pl, "quantity"); - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - } + throw new Exception("multiple pieces not yet supported !"); } } -//echo '
Product Details ==>';print_r($product_line);echo '
'; -//echo '
';print_r($associated_products);echo '
'; - // ************************ END POPULATE DATA ***************************8 -$page_num='1'; -$pdf = new PDF( 'P', 'mm', 'A4' ); -$pdf->Open(); - -$num_pages=ceil(count($product_line)/$products_per_page); - - -$current_product=0; -for($l=0;$l<$num_pages;$l++) -{ - $line=array(); - if($num_pages == $page_num) - $lastpage=1; - - while($current_product != $page_num*$products_per_page) - { - $line[]=$product_line[$current_product]; - $current_product++; - } - - //if bottom > 145 then we skip the Description and T&C in every - //page and display only in lastpage - //if you want to display the description and T&C in each page then - //set the display_desc_tc='true' and bottom <= 145 in pdfconfig.php - $pdf->AddPage(); - if( $page_num == "1") { - include("pdf_templates/".$template."/firstpage/header.php"); - include("pdf_templates/".$template."/firstpage/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/firstpage/footer.php"); - } else { - include("pdf_templates/".$template."/pages/header.php"); - include("pdf_templates/".$template."/pages/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/pages/footer.php"); - } - - $page_num++; - - if (($endpage) && ($lastpage)) - { - $pdf->AddPage(); - include("pdf_templates/".$template."/lastpage/header.php"); - include("pdf_templates/".$template."/lastpage/body.php"); - include("pdf_templates/".$template."/lastpage/footer.php"); - } -} - - -$pdf->Output('Invoice-'.$crmid.'.pdf','D'); //added file name to make it work in IE, also forces the download giving the user the option to save +$render->addData(array +( + 'valid_until' => $focus->column_fields["duedate"], + 'description' => from_html($focus->column_fields["description"]), + 'conditions' => from_html($focus->column_fields["terms_conditions"]), + 'tax_type' => $focus->column_fields['hdnTaxType'], + 'ident' => $focus->column_fields['invoice_no'], + 'contact:name' => getContactName($focus->column_fields["contact_id"]), + 'company:name' => $orgdetails["name"], + 'company:addr:city' => $orgdetails["city"], + 'company:addr:pcode' => $orgdetails["code"], + 'company:addr:street' => $orgdetails["address"], + 'company:addr:country' => $orgdetails["country"], + 'company:addr:state' => $orgdetails["state"], + 'company:phone' => $orgdetails["phone"], + 'company:fax' => $orgdetails["fax"], + 'company:website' => $orgdetails["website"], + 'customer:name' => getAccountName($focus->column_fields[account_id]), + 'shipping:addr:city' => $focus->column_fields["ship_city"], + 'shipping:addr:pcode' => $focus->column_fields["ship_code"], + 'shipping:addr:street' => $focus->column_fields["ship_street"], + 'shipping:addr:country' => $ship_country = $focus->column_fields["ship_country"], + 'shipping:addr:state' => $focus->column_fields["ship_state"], + 'billing:addr:city' => $focus->column_fields["bill_city"], + 'billing:addr:pcode' => $focus->column_fields["bill_code"], + 'billing:addr:street' => $focus->column_fields["bill_street"], + 'billing:addr:country' => $focus->column_fields["bill_country"], + 'billing:addr:state' => $focus->column_fields["bill_state"] +)); -// Added to fix annoying bug that includes HTML in your PDF +$render->sendHTTPOutput(); exit(); -?> -------------- next part -------------- diff -ruN htdocs.orig/templates/tex/default/config.php htdocs/templates/tex/default/config.php --- htdocs.orig/templates/tex/default/config.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/config.php 2007-05-09 20:00:54.000000000 +0200 @@ -0,0 +1,7 @@ + 'de', + 'tex2pdf' => 'pdflatex' +); diff -ruN htdocs.orig/templates/tex/default/invoice/item.texi htdocs/templates/tex/default/invoice/item.texi --- htdocs.orig/templates/tex/default/invoice/item.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/item.texi 2007-05-10 14:25:30.000000000 +0200 @@ -0,0 +1,2 @@ +::Item:Name:: \ifempty{::Item:Comment::}{}{(::Item:Comment::)} & ::Item:Price:: \Euro & ::Item:Amount:: & ::Item:Total:: \Euro \\ +\hline diff -ruN htdocs.orig/templates/tex/default/invoice/main.texi htdocs/templates/tex/default/invoice/main.texi --- htdocs.orig/templates/tex/default/invoice/main.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/main.texi 2007-05-10 14:15:53.000000000 +0200 @@ -0,0 +1,53 @@ +\def\ResourcePrefix{::TemplateDir::/resource} +\input \ResourcePrefix/bill.tex + +\def\ifempty#1#2#3{\def\inner{#1}\ifx\inner\empty + #2\else #3\fi } + +\begin{document} + \letterInit + \begin{letter}{% + ::Customer:Addr:Street:: \ \\ + ::Customer:Addr:PCode::\ ::Customer:Addr:City:: \ \\ + \ \\[\medskipamount] + } + + \opening{\Large Ihre Rechnung:\normalsize~~~ ::Bill:Ident:: +%% ~~~~~~~~~~vom:~~::BillDate:: + } + + \setlength\LTleft{0pt} + \setlength\LTright{72pt} + \begin{longtable}{|p{300pt}|r|r|r|} + \hline + Leistung & Preis & Menge & Summe \\ + \hline + \endhead + \hline + \hline + \multicolumn{3}{|l|}{Rechnungsbetrag} & ::Bill:Total:: \Euro \\ + \hline + \multicolumn{3}{|l|}{Umsatzsteuer} & ::Bill:Taxes:: \Euro \\ + \hline + \hline + \multicolumn{3}{|l|}{Gesamt} & ::Bill:Topay:: \Euro \\ + \hline + \noalign{ + \vspace{12pt} + \small + Soweit nicht anders angegeben entspricht das Lieferdatum + dem Rechnungsdatum + } + \noalign{ + \vspace{12pt} + \normalsize + Bitte {\"u}berweisen Sie den f{\"a}lligen Betrag binnen + 10~Tagen auf eines unserer Konten. \newline + Die Ware bleibt bis zur vollst{\"a}ndigen Bezahlung Eigentum + von metux IT service. + } + \endlastfoot + ::Items:: + \end{longtable} + \end{letter} +\end{document} diff -ruN htdocs.orig/templates/tex/default/resource/bill.tex htdocs/templates/tex/default/resource/bill.tex --- htdocs.orig/templates/tex/default/resource/bill.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/bill.tex 2007-05-09 23:55:35.000000000 +0200 @@ -0,0 +1,22 @@ +\input{\ResourcePrefix/metux.tex} + +\documentclass[a4paper,bottom=0cm,fromalign=center,fromlogo=true]{scrlttr2} +\usepackage{epsfig} +\usepackage{longtable} + +\usepackage{ngerman} +\usepackage[latin1]{inputenc} +%usepackage{fancyhdr} +%pagestyle{fancy} + +% brief-init +\newcommand\letterInit{% + \captionsgerman + \dategerman + \firsthead{\metuxHeader} + \firstfoot{\metuxFooter} + \setkomavar{fromname}{metux IT service} + \setkomavar{fromaddress}{Heydaer Stra{\ss}e 23, 99338 Plaue} +} + +\newcommand\Euro{Euro} diff -ruN htdocs.orig/templates/tex/default/resource/header.eps htdocs/templates/tex/default/resource/header.eps --- htdocs.orig/templates/tex/default/resource/header.eps 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.eps 2002-09-17 01:45:21.000000000 +0200 @@ -0,0 +1,178 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: header.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3d +%%CreationDate: Tue Jul 30 18:35:09 2002 +%%For: ems at nibiru.metux.de () +%%BoundingBox: 0 0 643 88 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 88 moveto 0 0 lineto 643 0 lineto 643 88 lineto closepath clip newpath +-4.5 96.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/reencdict 12 dict def /ReEncode { reencdict begin +/newcodesandnames exch def /newfontname exch def /basefontname exch def +/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def +basefontdict { exch dup /FID ne { dup /Encoding eq +{ exch dup length array copy newfont 3 1 roll put } +{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall +newfont /FontName newfontname put newcodesandnames aload pop +128 1 255 { newfont /Encoding get exch /.notdef put } for +newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat +newfontname newfont definefont pop end } def +/isovec [ +8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde +8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis +8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron +8#220 /dotlessi 8#230 /oe 8#231 /OE +8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling +8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis +8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot +8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus +8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph +8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine +8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf +8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute +8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring +8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute +8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute +8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve +8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply +8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex +8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave +8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring +8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute +8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute +8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve +8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide +8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex +8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def +/Courier-Bold /Courier-Bold-iso isovec ReEncode +/Times-Bold /Times-Bold-iso isovec ReEncode +/Times-Roman /Times-Roman-iso isovec ReEncode +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +/Times-Roman-iso ff 150.00 scf sf +6600 1200 m +gs 1 -1 sc (www.metux.de) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 825 m +gs 1 -1 sc (+49 36207 51833) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 675 m +gs 1 -1 sc (+49 174 7066481) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 1350 m +gs 1 -1 sc (contact @ metux.de) col8 sh gr +/Courier-Bold-iso ff 180.00 scf sf +1650 750 m +gs 1 -1 sc (Ihr innovativer IT-Dienstleister) col25 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 1200 m +gs 1 -1 sc ( Internet) col0 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 675 m +gs 1 -1 sc ( Telephon) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1350 m +gs 1 -1 sc (Advance Bank \(BLZ 702 300 00\), Kto-Nr: 200 72 64 206) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1575 m +gs 1 -1 sc (Enrico Weigelt, Steuer-Nr: 154/286/05931) col8 sh gr +/Times-Bold-iso ff 300.00 scf sf +75 750 m +gs 1 -1 sc (metux ITS) col9 sh gr +/Courier-Bold-iso ff 150.00 scf sf +150 1350 m +gs 1 -1 sc (Bankverbindung:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +750 1575 m +gs 1 -1 sc (Inhaber:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +225 1125 m +gs 1 -1 sc (Hausanschrift:) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1125 m +gs 1 -1 sc (Heydaer Strasse 23 99338 Plaue) col8 sh gr +/Times-Roman-iso ff 180.00 scf sf +10125 300 m +gs 1 -1 sc (tricktext) col0 sh gr +$F2psEnd +rs diff -ruN htdocs.orig/templates/tex/default/resource/header.fig htdocs/templates/tex/default/resource/header.fig --- htdocs.orig/templates/tex/default/resource/header.fig 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.fig 2002-09-17 01:44:26.000000000 +0200 @@ -0,0 +1,24 @@ +#FIG 3.2 +Landscape +Center +Inches +A4 +100.00 +Single +-2 +1200 2 +4 0 0 893 -1 14 10 -0.0000 4 135 1350 150 1350 Bankverbindung:\001 +4 0 0 890 -1 14 10 -0.0000 4 105 1260 225 1125 Hausanschrift:\001 +4 0 9 918 -1 2 20 0.0000 4 150 1005 75 750 metux ITS\001 +4 0 25 969 -1 14 12 -0.0000 4 135 3360 1650 750 Ihr innovativer IT-Dienstleister\001 +4 0 0 942 -1 2 10 0.0000 4 135 750 5700 675 Telephon\001 +4 0 8 991 -1 0 10 0.0000 4 105 1050 6600 675 +49 174 7066481\001 +4 0 8 997 -1 0 10 0.0000 4 105 1050 6600 825 +49 36207 51833\001 +4 0 8 999 -1 0 10 0.0000 4 105 990 6600 1200 www.metux.de\001 +4 0 0 946 -1 2 10 0.0000 4 105 765 5700 1200 Internet\001 +4 0 8 888 -1 0 10 0.0000 4 135 1935 1650 1125 Heydaer Strasse 23 99338 Plaue\001 +4 0 8 987 -1 0 10 0.0000 4 135 1230 6600 1350 contact @ metux.de\001 +4 0 8 933 -1 0 10 0.0000 4 135 3435 1650 1350 Advance Bank (BLZ 702 300 00), Kto-Nr: 200 72 64 206\001 +4 0 0 50 0 0 12 0.0000 4 135 645 10125 300 tricktext\001 +4 0 0 893 -1 14 10 0.0000 4 105 720 750 1575 Inhaber:\001 +4 0 8 933 -1 0 10 0.0000 4 135 2415 1650 1575 Enrico Weigelt, Steuer-Nr: 154/286/05931\001 diff -ruN htdocs.orig/templates/tex/default/resource/metux.tex htdocs/templates/tex/default/resource/metux.tex --- htdocs.orig/templates/tex/default/resource/metux.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/metux.tex 2007-05-09 23:56:59.000000000 +0200 @@ -0,0 +1,76 @@ +% Variablen .... % +\def\metuxSignature{\epsfig{file=\ResourcePrefix/signature.png}} +\def\metuxName{metux IT service} +\def\metuxPhone{+49-36207-519931} +\def\metuxFax{+49-36207-519932} +\def\metuxEmail{weigelt at metux.de} +\def\metuxUrl{www.metux.de} +\def\metuxAddress{Heydaer Stra{\ss}e 23, 99338 Plaue} +\def\metuxBankAccount{0972596900} +\def\metuxBankCompany{Dresdner Bank AG} +\def\metuxBankCode{82080000} +\def\metuxBank{Kto: \metuxBankAccount, BLZ: \metuxBankCode, \metuxBankCompany} +\def\metuxStrnr{154/286/05931} +\def\metuxOwner{Enrico Weigelt} + +\def\nl{\ \\} +\def\metuxGeomLeft{2cm} +\def\metuxGeomRight{2cm} +\def\metuxGeomBottom{1cm} +\def\metuxGeomHead{1cm} +\def\metuxGeomTop{0.5cm} + +\newcommand\metuxFooter +{ + \hrule + ~\newline + \parbox[l]{180pt}{ + \small + \metuxName \\ + Inh. \metuxOwner \\ + \metuxAddress \\ + StNr: \metuxStrnr + } + \parbox[l]{180pt}{ + \small + Bankverbindung: \\ + Kto: \metuxBankAccount \\ + BLZ: \metuxBankCode \\ + \metuxBankCompany + } + \parbox[l]{180pt}{ + \small + Tel: \metuxPhone \\ + Fax: \metuxFax \\ + eMail: \metuxEmail \\ + WWW: \metuxUrl + } +} + +\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.png}} +%\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.eps}} +\newcommand\metuxInit{ + \renewcommand{\headrulewidth}{0.5pt} + \renewcommand{\footrulewidth}{0.5pt} + \cfoot{\metuxFooter} + \chead{\metuxHeader} +} + +% \newcommand\Euro{Euro} + +\def\metuxMFG{% + \noindent Mit freundlichem Gru\ss + + \epsfig{\metuxSignature} + + \noindent Enrico Weigelt \\ + metux IT service +} + +\def\metuxMFGpriv{% + \noindent Mit freundlichem Gru\ss + + \metuxSignature + + \noindent Enrico Weigelt +} From amvandemore at gmail.com Thu May 10 15:59:44 2007 From: amvandemore at gmail.com (Adam Vande More) Date: Thu, 10 May 2007 14:59:44 -0500 Subject: [Vtigercrm-developers] Custom Integration with website Message-ID: <6201873e0705101259w1eb599d0xd5fcbb0916cb546c@mail.gmail.com> I have written our contact us page to insert the customer's information directly into vtiger as a lead. I am aware that the webforms add on does the same thing but I elected to write my own script. The script inserts data into tables: vtiger_crmentity vtiger_leaddetails vtiger_leadaddress vtiger_leadscf vtiger_leadsubdetails vtiger_crmentity_seq - increments the value In testing this appears to work just fine, however it occurs to me that I may have missed some possible constraints in the db that could result in data integrity issues if i didn't do this correctly. Are there any other tables that should be updated or any other areas I should be worried about? Also the webforms source seems exceedingly complex for a relatively simple task and it's too abstracted for me to be able to read easily. I'm not sure if it's doing checks that I should implement too. Does anyone have any insight into this? -- Adam Vande More Systems Administrator Mobility Sales -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/6318a0f8/attachment-0003.html From weigelt at metux.de Thu May 10 20:13:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 02:13:35 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() Message-ID: <20070511001335.GA5640@nibiru.local> Hi folks, as we sometimes get some errors like: # Fatal error: Call to a member function Move() on a non-object # in .../include/database/PearDatabase.php on line 443 Obviously sometimes the query_result() method is called with an non-existing result object. This patch adds an check which throws an exception on missing result object, so we can easily track it down. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 @@ -438,6 +438,8 @@ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); + if (!is_object($result)) + throw new Exception("result is not an object"); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); From jorge.torres.maldonado at gmail.com Thu May 10 20:31:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Thu, 10 May 2007 20:31:24 -0400 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <530c7d700705101731q8704acw53e1e2f0e7bfc03f@mail.gmail.com> THis one I like, thank you very much On 5/10/07, Enrico Weigelt wrote: > > > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/152bcf4f/attachment-0001.html From weigelt at metux.de Thu May 10 21:13:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:13:10 +0200 Subject: [Vtigercrm-developers] [PATCH] some new $adb (PearDatabase) methods Message-ID: <20070511011310.GA19509@nibiru.local> Hi folks, this patch adds two new functions to the PearDatabase ($adb) class: * sql_concat(array): generates an sql expression for field concatenations, based on selected RDBMS. * run_query_field(string): executes an given SQL query and returns only the first field of the first record. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-11 02:17:06.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 02:55:29.000000000 +0200 @@ -434,6 +434,31 @@ return $this->change_key_case($result->FetchRow()); } + function sql_concat($list) + { + switch ($this->dbType) + { + case 'mysql': + return 'concat('.implode(',',$list).')'; + case 'pgsql': + return '('.implode('||',$list).')'; + default: + throw new Exception("unsupported dbtype \"".$this->dbType."\""); + } + } + + function run_query_field($sql) + { + $this->checkConnection(); + $result = $this->database->Execute($sql); + + if (!is_object($result)) + throw new Exception("query failed: $sql"); + + $row = $result->FetchRow(); + return array_shift($row); + } + /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { From weigelt at metux.de Thu May 10 21:32:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:32:07 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) Message-ID: <20070511013207.GB19509@nibiru.local> Hi folks, the leads module (Tracker.php) suffers from an sql bug: it uses mysql specific sql statements for concatenating fields. This ends up in empty result objects and so the already mentioned error of trying to call Move() on non-object. This patch solves this by using the new PearDatabas::sql_concat() function (see prev. patch) for creating the statement. Also this patch calls the new PearDatabase::run_query_field() for the one-field-query. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 @@ -80,18 +80,23 @@ $entityidfield = $adb->query_result($result,0,'entityidfield'); if(!(strpos($fieldsname,',') === false)) { - $fieldlists = explode(',',$fieldsname); - $fieldsname = "concat("; - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); - $fieldsname = $fieldsname.")"; + // concatenate multiple fields with an whitespace between them + $fieldlists = explode(',',$fieldsname); + $fl = array(); + foreach($fieldlists as $w => $c) + { + if (count($fl)) + $fl[] = "' '"; + $fl[] = $c; + } + $fieldsname = $adb->sql_concat($fl); } if($current_module =='Organization') { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; } else { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; } - $result = $adb->query($query1); - $item_summary = $adb->query_result($result,0,'entityname'); + $item_summary = $adb->run_query_field($query1); } ### Check database item sizes From jens at Strawberry.COM Fri May 11 03:36:01 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 09:36:01 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) In-Reply-To: <20070511013207.GB19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 03:32:07AM +0200 References: <20070511013207.GB19509@nibiru.local> Message-ID: <20070511093601.A14681@Strawberry.COM> Hi, my Postgres patches already introduced a stored procedure which handles concats in Postgres. This is IMHO mor performant. Jens On Fri, May 11, 2007 at 03:32:07AM +0200, Enrico Weigelt wrote: > > Hi folks, > > > the leads module (Tracker.php) suffers from an sql bug: it uses > mysql specific sql statements for concatenating fields. This ends > up in empty result objects and so the already mentioned error > of trying to call Move() on non-object. > > This patch solves this by using the new PearDatabas::sql_concat() > function (see prev. patch) for creating the statement. > > Also this patch calls the new PearDatabase::run_query_field() > for the one-field-query. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php > --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 > @@ -80,18 +80,23 @@ > $entityidfield = $adb->query_result($result,0,'entityidfield'); > if(!(strpos($fieldsname,',') === false)) > { > - $fieldlists = explode(',',$fieldsname); > - $fieldsname = "concat("; > - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); > - $fieldsname = $fieldsname.")"; > + // concatenate multiple fields with an whitespace between them > + $fieldlists = explode(',',$fieldsname); > + $fl = array(); > + foreach($fieldlists as $w => $c) > + { > + if (count($fl)) > + $fl[] = "' '"; > + $fl[] = $c; > + } > + $fieldsname = $adb->sql_concat($fl); > } > if($current_module =='Organization') { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; > } else { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; > } > - $result = $adb->query($query1); > - $item_summary = $adb->query_result($result,0,'entityname'); > + $item_summary = $adb->run_query_field($query1); > } > > ### Check database item sizes > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From philip at vtiger.com Fri May 11 06:29:36 2007 From: philip at vtiger.com (Philip) Date: Fri, 11 May 2007 15:59:36 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <46444590.1040501@vtiger.com> Hi Enrico, When tested the code i had the following exception thrown in the screen. *Fatal error*: Uncaught exception 'Exception' with message 'given result set is not an object' in /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 Stack trace: #0 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): PearDatabase->query_result(false, 0, 'count') #1 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): include('/home/crm-test3...') #2 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): require_once('/home/crm-test3...') #3 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): require_once('/home/crm-test3...') #4 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): include('/home/crm-test3...') #5 {main} thrown in */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* on line *442 *So where should i catch this exception. Regards, Philip Enrico Weigelt wrote: > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > > ------------------------------------------------------------------------ > > diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php > --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 > @@ -438,6 +438,8 @@ > function query_result(&$result, $row, $col=0) > { > //$this->println("ADODB query_result r=".$row." c=".$col); > + if (!is_object($result)) > + throw new Exception("result is not an object"); > $result->Move($row); > $rowdata = $this->change_key_case($result->FetchRow()); > //$this->println($rowdata); > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Fri May 11 09:57:17 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 15:57:17 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <46444590.1040501@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> Message-ID: <20070511135717.GD19509@nibiru.local> * Philip schrieb: Hi, > When tested the code i had the following exception thrown in the screen. > > *Fatal error*: Uncaught exception 'Exception' with message 'given result > set is not an object' in > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 > Stack trace: #0 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): > PearDatabase->query_result(false, 0, 'count') #1 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): > include('/home/crm-test3...') #2 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): > require_once('/home/crm-test3...') #3 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): > require_once('/home/crm-test3...') #4 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): > include('/home/crm-test3...') #5 {main} thrown in > */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* > on line *442 Looks like an bug in Potentials/ListView.php. Probably an query failed and so $result is empty. We've lots of such issues everywhere :( cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:38:26 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:38:26 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers Message-ID: <20070511143826.GF19509@nibiru.local> Hi folks, is it possible (by the db schema) to change invoice numbers ? I don't like the automatic numbering very much and like to change the numbers. I suspect similar trouble as w/ the org/company name ;-O cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:46:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:46:44 +0200 Subject: [Vtigercrm-developers] Sending invoice via email Message-ID: <20070511144644.GG19509@nibiru.local> Hi folks, I'm looking for an function to send invoices automatically via eMail. Is there already such an function or should I implement it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:57:14 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:57:14 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" Message-ID: <20070511145714.GH19509@nibiru.local> Hi folks, could anyone please explain what the invoice status "credited invoice" actually means ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Fri May 11 11:03:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:03:35 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511143826.GF19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:38:26PM +0200 References: <20070511143826.GF19509@nibiru.local> Message-ID: <20070511170335.A16456@Strawberry.COM> Hi, originally the invoice number was just the CRMEntity ID. As it is for any other entity like quotes, so, ... But: hasn't there been a recent change on that (just invoices)? What about a generic solution to that issue, too? I was already thinking about introducing "ranges of numbers", a table that defines the format of particular numbers, like invoice-numbers, product-numbers etc. Especially for invoices we need some automatism. Some govern- ments - Germany !!! - forces companies to provide an determi- nistic numbering scheme for invoices. So this field cannot be assigned manually to each invoice. jens On Fri, May 11, 2007 at 04:38:26PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > is it possible (by the db schema) to change invoice numbers ? > > I don't like the automatic numbering very much and like to change > the numbers. > > I suspect similar trouble as w/ the org/company name ;-O > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Fri May 11 11:07:02 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:07:02 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511145714.GH19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:57:14PM +0200 References: <20070511145714.GH19509@nibiru.local> Message-ID: <20070511170702.C16456@Strawberry.COM> Eine Stundung? On Fri, May 11, 2007 at 04:57:14PM +0200, Enrico Weigelt wrote: > > Hi folks, > > could anyone please explain what the invoice status > "credited invoice" actually means ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Fri May 11 11:22:25 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:22:25 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511170335.A16456@Strawberry.COM> References: <20070511143826.GF19509@nibiru.local> <20070511170335.A16456@Strawberry.COM> Message-ID: <20070511152225.GI19509@nibiru.local> * Jens Hamisch schrieb: Hi, > originally the invoice number was just the CRMEntity ID. > As it is for any other entity like quotes, so, ... > But: hasn't there been a recent change on that (just invoices)? Ah, I see: The invoice ID is actually an pointer for schema internal references. And that's the source of the problem: internal references should always base on internal object IDs, never on user- visible idents/names. > What about a generic solution to that issue, too? > I was already thinking about introducing "ranges of numbers", > a table that defines the format of particular numbers, like > invoice-numbers, product-numbers etc. Ugh, no. Not for the object references. For such things we have sequences, which produce OIDs (which are in fact just unique numbers). Many things which an user would call "number" are names, not numbers. So ie. for invoice numbers: they're not object ID's, but names. Of course names, which follow certain rules, ie. for automatic allocation, but from the schema's view they're just opaque names, strings, text. > Especially for invoices we need some automatism. Some govern- > ments - Germany !!! - forces companies to provide an determi- > nistic numbering scheme for invoices. So this field cannot be > assigned manually to each invoice. Leave this to the user/admin. It should be clear that the "invoice_no" field cannot be an object id. So the first step is to introduce an separate oid field (fed by some sequence) and let *all* references point on that field. From now on let's call the old invoice_no field an invoice ident. The second step is to implement an customizable scheme for autmatic invoice ident allocation. Maybe put this into an separate class, which can be easily adoped to user's needs. Whether some crm user should be allowed to change the invoice idents is just an permission issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 11:24:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:24:50 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511170702.C16456@Strawberry.COM> References: <20070511145714.GH19509@nibiru.local> <20070511170702.C16456@Strawberry.COM> Message-ID: <20070511152450.GJ19509@nibiru.local> * Jens Hamisch schrieb: switching this thread to german: > Eine Stundung? Ok. Man kann Rechnungen nur komplett stunden ? F?r Ratenzahlung, etc haben wir noch kein Handling ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From fp at crm-now.de Fri May 11 12:27:42 2007 From: fp at crm-now.de (Frank Piepiorra) Date: Fri, 11 May 2007 18:27:42 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: Message-ID: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Enrico, any chance that you post your contribution as files at vtigerForge? Regards, Frank From weigelt at metux.de Fri May 11 14:11:59 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:11:59 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> References: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Message-ID: <20070511181159.GA25485@nibiru.local> * Frank Piepiorra schrieb: Hi, > any chance that you post your contribution as files at vtigerForge? any chance for doing this per command line ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- From gopals at vtiger.com Fri May 11 14:34:35 2007 From: gopals at vtiger.com (Gopal) Date: Sat, 12 May 2007 00:04:35 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511135717.GD19509@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> Message-ID: <4644B73B.70005@vtiger.com> Hi Enrico, Thanks for your suggestions to take vtiger to next level. Please don't hesitate to highlight issues (if any) in various places. In fact Philip has tried to integrate your patch with our 5.0.3 release. However, he is unsuccessful. It will be of great help, if you could spend your valuable time on our forthcoming 5.0.3 release. I am confident, with our community support we can release a better product. Best Regards, Gopal (vtiger Team) Enrico Weigelt wrote: > * Philip schrieb: > > Hi, > > >> When tested the code i had the following exception thrown in the screen. >> >> *Fatal error*: Uncaught exception 'Exception' with message 'given result >> set is not an object' in >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 >> Stack trace: #0 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): >> PearDatabase->query_result(false, 0, 'count') #1 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): >> include('/home/crm-test3...') #2 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): >> require_once('/home/crm-test3...') #3 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): >> require_once('/home/crm-test3...') #4 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): >> include('/home/crm-test3...') #5 {main} thrown in >> */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* >> on line *442 >> > > Looks like an bug in Potentials/ListView.php. > Probably an query failed and so $result is empty. > > We've lots of such issues everywhere :( > > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070512/b5575516/attachment-0001.html From weigelt at metux.de Fri May 11 14:55:11 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:55:11 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <4644B73B.70005@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> Message-ID: <20070511185511.GB25485@nibiru.local> * Gopal schrieb: Hi, > In fact Philip has tried to integrate your patch with our 5.0.3 > release. However, he is unsuccessful. It will be of great help, if you > could spend your valuable time on our forthcoming 5.0.3 release. I'm entirely working on Jens's 5.1 branch, since I need postgres. IMHO we first should get 5.0.3 and 5.1_jens merged. My patches are divided into two groups: *jens*.diff -> the changes from 5.1_jens to jens' personal tree *nekrad*.diff -> my own changes based on jens' tree. Maybe, in some cases the ordering could be significant (although it *should* not ;-O) Some of my patches *might* also work on 5.0.3, but I didn't check. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From philip at vtiger.com Mon May 14 02:20:29 2007 From: philip at vtiger.com (Philip) Date: Mon, 14 May 2007 11:50:29 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511185511.GB25485@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> <20070511185511.GB25485@nibiru.local> Message-ID: <4647FFAD.3020804@vtiger.com> Hi Enrico, Regarding the patch, to overcome the empty result error you have given the throw exception, function but whenever we use throw exception, we need to use catch function, because of this i got uncaught exception during the patch integration. Does the patch works fine with out caught function in your setup? if not where do we need to include this catch function? Any help would be highly appreciated. Regards, Philip Enrico Weigelt wrote: > * Gopal schrieb: > > Hi, > > >> In fact Philip has tried to integrate your patch with our 5.0.3 >> release. However, he is unsuccessful. It will be of great help, if you >> could spend your valuable time on our forthcoming 5.0.3 release. >> > > I'm entirely working on Jens's 5.1 branch, since I need postgres. > IMHO we first should get 5.0.3 and 5.1_jens merged. > > My patches are divided into two groups: > > *jens*.diff -> the changes from 5.1_jens to jens' personal tree > *nekrad*.diff -> my own changes based on jens' tree. > > Maybe, in some cases the ordering could be significant > (although it *should* not ;-O) > > > Some of my patches *might* also work on 5.0.3, but I didn't check. > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070514/4c27c9ee/attachment-0003.html From anugupta at pu.ac.in Mon May 14 04:59:42 2007 From: anugupta at pu.ac.in (Anu Gupta DCSA) Date: Mon, 14 May 2007 15:29:42 +0630 Subject: [Vtigercrm-developers] A Survey on Defect Management Practices in Free/Open Source Software Message-ID: <20070514085932.M82540@pu.ac.in> Sir/Madam I seek help from designers, developers, testers,defect fixers,project managers or playing any other key role in Free/Open Source software development or maintenence in carrying out a study on practices and problems of defect management in various Free/Open Source Software projects. The insights gained from the study can further help us to extract publicly accessible defect data and determine impact of defect management practices on software quality. Please spend a few minutes of your precious time to fill up the Questionnaire. The most of the questions follow multiple choice formats and are quite easy to answer. To have the Online Questionnaire, please visit: http://anu.puchd.ac.in/phpESP/public/survey.php?name=FOSS_Defect_Survey (You can also copy and paste this link into your browser, and hit the 'Return' key.) I hope you will find all the questions interesting and thought-provoking. Your answers will be kept anonymous.The data thus collected will only be used for research purpose.It would be nice if you may further refer this mail to others actively engaged with Free/Open Source Software development. If you have any query or suggestions then feel free to contact. Thank You With regards, Anu Gupta Senior Lecturer Department of Computer Science and Applications, Panjab University, Chandigarh. INDIA In case of any problem in accessing/using the above mentioned link please contact: E-mail: anugupta at pu.ac.in anugupta98 at gmail.com From joe at tsolucio.com Tue May 15 19:56:04 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 16 May 2007 01:56:04 +0200 Subject: [Vtigercrm-developers] Custom Invoice Number Message-ID: <464A4894.1060001@tsolucio.com> Hi, I have just looked at this code. I believe that this is not the correct way to solve the autoincrement problem Perfectioning the code that already exists in forum/wiki for this you would have had a more complete solution that would serve any module. Instead you have whipped up your own solution which is probably not multi-user safe, you have hardcoded english text into a checkduplicate function which would not be necessary if you were using the database which is already transaction and multiuser safe and you are writing php files with code each time an invoice is made. Have you at all thought about 4-5 people making invoices at a time? Why are you still hardcoding strings in the code? Why not trust the database to avoid overlapping? I mean the database guys have solved this problem a long time ago, who are we to invent a new untested system? As normal you leave aside the community. I know I am becomming a persona non grata here, but somebody has to say these things. If you keep in this line this product is doomed. Joe TSolucio From davidv.net at gmail.com Wed May 16 09:09:47 2007 From: davidv.net at gmail.com (David V.) Date: Wed, 16 May 2007 09:09:47 -0400 Subject: [Vtigercrm-developers] Custom Invoice Number In-Reply-To: <464A4894.1060001@tsolucio.com> References: <464A4894.1060001@tsolucio.com> Message-ID: Joe, You are beeing a bit hard here but thank you for reporting this. I'm also waiting for a better solution for invoices number but I have to admit I did not spend the necessary time to look at the new code in 5.0.3. Thank you. David V. 2007/5/15, Joe Bordes : > Hi, > > I have just looked at this code. > I believe that this is not the correct way to solve the autoincrement > problem > Perfectioning the code that already exists in forum/wiki for this you > would have had a more complete solution that would serve any module. > Instead you have whipped up your own solution which is probably not > multi-user safe, you have hardcoded english text into a checkduplicate > function which would not be necessary if you were using the database > which is already transaction and multiuser safe and you are writing php > files with code each time an invoice is made. > Have you at all thought about 4-5 people making invoices at a time? > Why are you still hardcoding strings in the code? > Why not trust the database to avoid overlapping? I mean the database > guys have solved this problem a long time ago, who are we to invent a > new untested system? > > As normal you leave aside the community. > > I know I am becomming a persona non grata here, but somebody has to say > these things. If you keep in this line this product is doomed. > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From chazarra.clement at gmail.com Mon May 21 09:20:04 2007 From: chazarra.clement at gmail.com (clement chazarra) Date: Mon, 21 May 2007 14:20:04 +0100 Subject: [Vtigercrm-developers] Security focus Message-ID: Hello everybody, I just wanted to point out a little document from drupal community highlighting secure ways to code. http://drupal.org/writing-secure-code My suggestion would even be to add in the wiki a "Security focus" page where we could add the different techniques developers should follow to produce secure code. If at some points the list seems quite complete and up to date, it might be a good idea to schedule a release dedicated on that matter and upgrade the whole code. Other pages in the wiki could be created as well, focusing on different important matters like performance/usability/etc. Byebye Clem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070521/b4c9e07d/attachment-0001.html From joe at tsolucio.com Mon May 28 11:40:07 2007 From: joe at tsolucio.com (Joe Bordes) Date: Mon, 28 May 2007 17:40:07 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 Message-ID: <1180366807.23252.14.camel@joesunix.int> Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio From aissa at abonlinesolutions.com Mon May 28 11:42:41 2007 From: aissa at abonlinesolutions.com (=?iso-8859-1?B?Qe9zc2E=?=) Date: Mon, 28 May 2007 17:42:41 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <1180366807.23252.14.camel@joesunix.int> References: <1180366807.23252.14.camel@joesunix.int> Message-ID: <000001c7a13e$d4db3ad0$7e91b070$@com> Idem here, it's bizarre. A?ssa ABOnline solutions -----Message d'origine----- De?: Joe Bordes [mailto:joe at tsolucio.com] Envoy??: lundi 28 mai 2007 17:40 ??: vtigercrm-developers at lists.vtigercrm.com Objet?: [Vtigercrm-developers] svn trunk in branches/5.0.3 Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From richie at vtiger.com Mon May 28 17:26:08 2007 From: richie at vtiger.com (richie) Date: Tue, 29 May 2007 02:56:08 +0530 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <000001c7a13e$d4db3ad0$7e91b070$@com> References: <1180366807.23252.14.camel@joesunix.int> <000001c7a13e$d4db3ad0$7e91b070$@com> Message-ID: <465B48F0.1020908@vtiger.com> Yes. Michel jaquemes had checked in the entire application as a separate folder. I have removed it. Pl. try now. Michel: I have revoked your permission to do mischief for now ;-) *Richie* A?ssa wrote: > Idem here, it's bizarre. > A?ssa > ABOnline solutions > > -----Message d'origine----- > De : Joe Bordes [mailto:joe at tsolucio.com] > Envoy? : lundi 28 mai 2007 17:40 > ? : vtigercrm-developers at lists.vtigercrm.com > Objet : [Vtigercrm-developers] svn trunk in branches/5.0.3 > > Hi, > > I just "updated" my svn version and recieved a new "trunk" directory > containing the whole application???? > > Joe > TSolucio > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/cbcb280f/attachment-0001.html From brian at pr2k.com Tue May 29 22:34:18 2007 From: brian at pr2k.com (Brian Laughlin) Date: Tue, 29 May 2007 19:34:18 -0700 Subject: [Vtigercrm-developers] Patch for decoupling Accounts from Potential Message-ID: <27CABE0A5EFD714EA5B2F9B47EE5CB85EDD693@svawmc1.awnow.local> We have a simple way of accomplishing this. Would love to see this or something like it roled into the main branch after 5.0.3 is released. http://forums.vtiger.com/viewtopic.php?p=47584#47584 Regards, Brian Laughlin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/3b8f7b0a/attachment-0002.html From gopals at vtiger.com Thu May 31 08:41:42 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 31 May 2007 18:11:42 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <465EC286.9060507@vtiger.com> Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal From richie at vtiger.com Thu May 31 09:12:34 2007 From: richie at vtiger.com (richie) Date: Thu, 31 May 2007 18:42:34 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC286.9060507@vtiger.com> References: <465EC286.9060507@vtiger.com> Message-ID: <465EC9C2.8040301@vtiger.com> Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 Thank you all for your patience and faith, *Richie* Gopal wrote: > Dear Team, > > I am happy to inform you all that we have successfully completed all our > routine tests. We are expecting release in another few hours time. > > Thanks & Regards, > Gopal > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/74578fc5/attachment-0002.html From brett.hooker at roarz.com Thu May 31 09:48:38 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 31 May 2007 23:48:38 +1000 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC9C2.8040301@vtiger.com> References: <465EC286.9060507@vtiger.com> <465EC9C2.8040301@vtiger.com> Message-ID: <465ED236.30205@roarz.com> Definition of popularity? Bringing SourceForge down when you release a product: richie wrote: > Dear Team, > > vtigercrm-5.0.3 is officially released. > You can have a look at the files at > http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 > > Thank you all for your patience and faith, > *Richie* > > Gopal wrote: >> Dear Team, >> >> I am happy to inform you all that we have successfully completed all our >> routine tests. We are expecting release in another few hours time. >> >> Thanks & Regards, >> Gopal >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0003.html -------------- next part -------------- A non-text attachment was scrubbed... Name: vt503dl-error.png Type: image/png Size: 52074 bytes Desc: not available Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0001.png From rvpromociones at yahoo.es Thu May 31 19:00:58 2007 From: rvpromociones at yahoo.es (Yosu Cadilla) Date: Thu, 31 May 2007 23:00:58 +0000 (GMT) Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <20070531230058.75110.qmail@web28008.mail.ukl.yahoo.com> Indeed! Saludos, Yosu Cadilla. ____________________________________________________________________________________ ?Descubre una nueva forma de obtener respuestas a tus preguntas! Entra en Yahoo! Respuestas. http://es.answers.yahoo.com/info/welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/14773489/attachment-0002.html From weigelt at metux.de Tue May 1 13:58:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 19:58:50 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <20070501175850.GB26224@nibiru.local> * Jorge Torres schrieb: Hi, > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that > may differ a lot from what vtiger golas might be, therefore I want > to start a new project at sourceforge.net based on vtigerCRM 5. Of course you're free to do your own fork, but I'd like to invite you to contribute to the upstream. If you're moving too far from the upstream, we cannot benefit from each other's work anymore. BTW: I'm currently working on my own branch for really porting it to postgresql. There're lots of things to clean up here. Once this is is done (and hopefully went to the upstream), I'm going to some works on making it easier to use (ie. switch off unused features). Maybe you'd like to join me ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Tue May 1 15:48:36 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 1 May 2007 14:48:36 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501175850.GB26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> Message-ID: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Enrico, Sure count me in, Can you send me some of your todo list, so I can check what I'm capable of helping with? That minimized branch you mentioned, would it still support MySQL? At this moment, I'm working on changing the pop-up windows, for WebWM windows, anyhow I will prepare a todo list I have in mind, so you get to see where we can join forces. Thank you, Jorge On 5/1/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Of course you're free to do your own fork, but I'd like to invite > you to contribute to the upstream. If you're moving too far from the > upstream, we cannot benefit from each other's work anymore. > > BTW: I'm currently working on my own branch for really porting it to > postgresql. There're lots of things to clean up here. Once this is > is done (and hopefully went to the upstream), I'm going to some > works on making it easier to use (ie. switch off unused features). > > Maybe you'd like to join me ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070501/689d85dc/attachment-0003.html From weigelt at metux.de Tue May 1 16:05:52 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 22:05:52 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Message-ID: <20070501200552.GC26224@nibiru.local> * Jorge Torres schrieb: Hi, > Can you send me some of your todo list, so I can check what > I'm capable of helping with? The most important, for now, is to replace all the $adb->query_result() calls, since a) it does not work with postgresql (adodb brokenness) and b) it's an huge resource waster. > That minimized branch you mentioned, would it still support MySQL? Yep. I don't intend to drop it. > At this moment, I'm working on changing the pop-up windows, for WebWM > windows, anyhow I will prepare a todo list I have in mind, so you get to see > where we can join forces. Ok. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From dome at tel.co.th Tue May 1 21:06:13 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 08:06:13 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> What's status of your poetgresql branch ? Can i test ? Dome C. On 5/2/07, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From gopals at vtiger.com Wed May 2 00:19:25 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 02 May 2007 09:49:25 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <4638114D.5010303@vtiger.com> Hi Jorge, Thanks for your interest in vtiger CRM project. Please see my response below (in blue color) Jorge Torres wrote: > Hi everyone, > > First I want to tell you developers that I admire your work. I first > downloaded vtiger a few days ago, for customer relationship management > at my uncles little ceramic factory, and I was amazed, but after I > showed it to him, well, it seems that it is too much for what my uncle > wants. * Gopal:* From the Security settings module, you can disable modules/fields that are not required. Please get back to me if you need any further clarifications. > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that may > differ a lot from what vtiger golas might be, therefore I want to > start a new project at sourceforge.net based > on vtigerCRM 5. * Gopal:* Down the road, we are planning to make vtiger CRM - fully customizable so that business users configure the vtiger system instead of hacking the code. Could you please post your goals, so that we will cross-check our road map and let you know our position? > I don't understand to much about Open Source Licencing restrictions > and related stuff, so please excuse my ignorance. My question are: * Gopal:* vtiger CRM code base contains our _*own contributions*_ and many third-party packages. Our own contributions are released under _vtiger Public License (based on Mozilla Public License)_. Please refer to the following URL for details about licenses of third-party packages: http://wiki.vtiger.com/index.php/Third_Party_Software > > Can I start a new project at sourceforge based on vtiger? * Gopal:* In general there are no issues in forking open source projects, provided you are not violating the Open Source license of your predecessor. > If so, Would I have to cover it under some other new license type? *Gopal:* Release your contributions under some Open Source license which meets your requirements. > Do I need some permit from vtiger team to start such project? * Gopal:* _vtiger CRM code base_ is 100% open source by spirit. Hence you may not require special permission from our side. > I know about removing logos because of trademarks, what else do I have > to remove? * > * * Gopal:* Kindly review the vtiger and other third-party licenses with your Legal adviser (council) before modifying back-end/front-end code base. On a separate note, our community is actively participating in vtiger development. Most of the community members (developers/testers/writers/translators) are directly contributing to the core code base (For example: PostgreSQL & DMS branches in our SVN). http://vtiger.fosslabs.com We are also encouraging many add-on projects based on vtiger CRM, which cater to the need of user-specific requirements. For more details, please refer to our vtigerForge: http://vtigerforge.com Best wishes, Gopal (vtiger - Team Member) > > Well that's it for now, I will continue on my "trying to understand > vtiger's code" task, so I will probably have some questions related to > developing in short. > > Thank you very much, > > > Jorge > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/48cab81f/attachment-0003.html From jens at Strawberry.COM Wed May 2 02:20:57 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:20:57 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local>; from Enrico Weigelt on Tue, May 01, 2007 at 10:05:52PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <20070502082057.D16394@Strawberry.COM> Hi, I already did a port to postgresql and have contributed my patches to Don and Ritchie so far. I do not agree that the $adb->query_results are broken as I'm running on postgresql since 5.0rc1 ... Jens On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 2 02:21:30 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:21:30 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:06:13AM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502082130.E16394@Strawberry.COM> You may use the 5.1_jens branch which is working. Jens On Wed, May 02, 2007 at 08:06:13AM +0700, Dome Charoenyost wrote: > What's status of your poetgresql branch ? > > Can i test ? > > Dome C. > > > On 5/2/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 2 06:35:59 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 12:35:59 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638114D.5010303@vtiger.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> Message-ID: <1178102159.31989.24.camel@joesunix.int> Hi, I read this thread and I just keep asking myself: what am I doing wrong? You guys have branches and are participating. I have been asking to help for a long time now and I am just being ignored. I really would like to help and work together. Joe TSolucio El mi?, 02-05-2007 a las 09:49 +0530, Gopal escribi?: > Hi Jorge, > > Thanks for your interest in vtiger CRM project. > > Please see my response below (in blue color) > > Jorge Torres wrote: > > Hi everyone, > > > > First I want to tell you developers that I admire your work. I first > > downloaded vtiger a few days ago, for customer relationship > > management at my uncles little ceramic factory, and I was amazed, > > but after I showed it to him, well, it seems that it is too much for > > what my uncle wants. > > Gopal: From the Security settings module, you can disable > modules/fields that are not required. Please get back to me if you > need any further clarifications. > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Gopal: Down the road, we are planning to make vtiger CRM - fully > customizable so that business users configure the vtiger system > instead of hacking the code. Could you please post your goals, so > that we will cross-check our road map and let you know our position? > > I don't understand to much about Open Source Licencing restrictions > > and related stuff, so please excuse my ignorance. My question are: > > Gopal: vtiger CRM code base contains our own contributions and many > third-party packages. Our own contributions are released under vtiger > Public License (based on Mozilla Public License). Please refer to the > following URL for details about licenses of third-party packages: > > http://wiki.vtiger.com/index.php/Third_Party_Software > > > > Can I start a new project at sourceforge based on vtiger? > > Gopal: In general there are no issues in forking open source projects, > provided you are not violating the Open Source license of your > predecessor. > > If so, Would I have to cover it under some other new license type? > Gopal: Release your contributions under some Open Source license which > meets your requirements. > > Do I need some permit from vtiger team to start such project? > > Gopal: vtiger CRM code base is 100% open source by spirit. Hence you > may not require special permission from our side. > > I know about removing logos because of trademarks, what else do I > > have to remove? > > Gopal: Kindly review the vtiger and other third-party licenses with > your Legal adviser (council) before modifying back-end/front-end code > base. > > On a separate note, our community is actively participating in vtiger > development. Most of the community members > (developers/testers/writers/translators) are directly contributing to > the core code base (For example: PostgreSQL & DMS branches in our > SVN). > > http://vtiger.fosslabs.com > > We are also encouraging many add-on projects based on vtiger CRM, > which cater to the need of user-specific requirements. For more > details, please refer to our vtigerForge: > > http://vtigerforge.com > > Best wishes, > Gopal > (vtiger - Team Member) > > > > Well that's it for now, I will continue on my "trying to understand > > vtiger's code" task, so I will probably have some questions related > > to developing in short. > > > > Thank you very much, > > > > > > Jorge > > > > ____________________________________________________________________ > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Wed May 2 06:56:24 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 12:56:24 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502105624.GA5311@nibiru.local> * Dome Charoenyost schrieb: > What's status of your poetgresql branch ? Work is still in progress. > Can i test ? I'll try to get some patches ready today. Or should I upload to SVN (need some short howto, I'm not really expierenced w/ svn) ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 2 07:13:36 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 13:13:36 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <20070502111336.GB5311@nibiru.local> * Jens Hamisch schrieb: Hi, > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... well, I can only speak for the latest release and my trunk checkout of last week. a) several things in schema create needed to be fixed b) schema update (ie. ALTER TABLE ...) was totally broken c) the adodb Move() method was completely missing in the postgres driver And the $adb->query_results() thing: Well, it's and really bad idea (even if pgsql->Move() would work). Too much complexity in- and outside, too long codepathes, too inefficient. I've introduced some new query functions: * $adb->run_query_allrecords($query) -> returns the result in an array/list records (associative arrays) * $adb->run_query_record($query) -> returns only the first record. * $adb->run_query_field($query,$field) -> returns given field from the first record * $adb->run_query_list($query,$field) -> returns an list of the values from given field. Now I'm in the process of rewriting the calls to query_result() to an appropriate of the new functions. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 2 09:24:47 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 15:24:47 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502111336.GB5311@nibiru.local>; from Enrico Weigelt on Wed, May 02, 2007 at 01:13:36PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> Message-ID: <20070502152447.A6085@Strawberry.COM> Hi, please have a look at the 5.1_jens branch at first! This is a 5.0.3 release sucessfully running on postgresql. This version is stable. The database fixes were introduced in an early 5.0 prerelease. I'm running vtiger on postgres since then. Part of the patches were already implemented in 5.0GA. The rest was posted to Richie/Don about 3 weeks ago. JenS On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > I already did a port to postgresql and have contributed my patches to > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > broken as I'm running on postgresql since 5.0rc1 ... > > well, I can only speak for the latest release and my trunk checkout > of last week. > > a) several things in schema create needed to be fixed > b) schema update (ie. ALTER TABLE ...) was totally broken > c) the adodb Move() method was completely missing in the postgres driver > > And the $adb->query_results() thing: > Well, it's and really bad idea (even if pgsql->Move() would work). > Too much complexity in- and outside, too long codepathes, too inefficient. > > I've introduced some new query functions: > > * $adb->run_query_allrecords($query) > -> returns the result in an array/list records (associative arrays) > > * $adb->run_query_record($query) > -> returns only the first record. > > * $adb->run_query_field($query,$field) > -> returns given field from the first record > > * $adb->run_query_list($query,$field) > -> returns an list of the values from given field. > > Now I'm in the process of rewriting the calls to query_result() > to an appropriate of the new functions. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 09:45:38 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:45:38 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502152447.A6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> Message-ID: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> i still found error on 5.1_jens Fatal error: Call to a member function on a non-object in /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 postgresql 8.1 php4.4 Debian etch Dome C. On 5/2/07, Jens Hamisch wrote: > > Hi, > > please have a look at the 5.1_jens branch at first! This is > a 5.0.3 release sucessfully running on postgresql. > This version is stable. The database fixes were introduced in > an early 5.0 prerelease. I'm running vtiger on postgres since > then. > > Part of the patches were already implemented in 5.0GA. The rest > was posted to Richie/Don about 3 weeks ago. > > JenS > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > * Jens Hamisch schrieb: > > > > Hi, > > > > > I already did a port to postgresql and have contributed my patches to > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > well, I can only speak for the latest release and my trunk checkout > > of last week. > > > > a) several things in schema create needed to be fixed > > b) schema update (ie. ALTER TABLE ...) was totally broken > > c) the adodb Move() method was completely missing in the postgres driver > > > > And the $adb->query_results() thing: > > Well, it's and really bad idea (even if pgsql->Move() would work). > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > I've introduced some new query functions: > > > > * $adb->run_query_allrecords($query) > > -> returns the result in an array/list records (associative arrays) > > > > * $adb->run_query_record($query) > > -> returns only the first record. > > > > * $adb->run_query_field($query,$field) > > -> returns given field from the first record > > > > * $adb->run_query_list($query,$field) > > -> returns an list of the values from given field. > > > > Now I'm in the process of rewriting the calls to query_result() > > to an appropriate of the new functions. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From dome at tel.co.th Wed May 2 09:46:16 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:46:16 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502105624.GA5311@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> <20070502105624.GA5311@nibiru.local> Message-ID: <8ccbff060705020646h4c848925k30338b574e6c2d60@mail.gmail.com> Please send me patch Thanks. Dome C. On 5/2/07, Enrico Weigelt wrote: > * Dome Charoenyost schrieb: > > What's status of your poetgresql branch ? > > Work is still in progress. > > > Can i test ? > > I'll try to get some patches ready today. > > Or should I upload to SVN (need some short howto, I'm not > really expierenced w/ svn) ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 10:37:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 16:37:37 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:45:38PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> Message-ID: <20070502163737.B6085@Strawberry.COM> Hi, I'm running php 5.1.4. According to the installation manual, 5.0.x thru 5.2.x is supported only. Jens On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > i still found error on 5.1_jens > Fatal error: Call to a member function on a non-object in > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > postgresql 8.1 > php4.4 > > Debian etch > > Dome C. > > > > On 5/2/07, Jens Hamisch wrote: > > > > Hi, > > > > please have a look at the 5.1_jens branch at first! This is > > a 5.0.3 release sucessfully running on postgresql. > > This version is stable. The database fixes were introduced in > > an early 5.0 prerelease. I'm running vtiger on postgres since > > then. > > > > Part of the patches were already implemented in 5.0GA. The rest > > was posted to Richie/Don about 3 weeks ago. > > > > JenS > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > * Jens Hamisch schrieb: > > > > > > Hi, > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > well, I can only speak for the latest release and my trunk checkout > > > of last week. > > > > > > a) several things in schema create needed to be fixed > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > And the $adb->query_results() thing: > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > I've introduced some new query functions: > > > > > > * $adb->run_query_allrecords($query) > > > -> returns the result in an array/list records (associative arrays) > > > > > > * $adb->run_query_record($query) > > > -> returns only the first record. > > > > > > * $adb->run_query_field($query,$field) > > > -> returns given field from the first record > > > > > > * $adb->run_query_list($query,$field) > > > -> returns an list of the values from given field. > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > to an appropriate of the new functions. > > > > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 11:22:52 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 22:22:52 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502163737.B6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> Message-ID: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> I'm test on php 5.2 found object to string error ( in log->debug) when create new contact Call to a member function Move() on a non-object in /var/www/crmpgsql/include/database/PearDatabase.php on line 441 Dome C. On 5/2/07, Jens Hamisch wrote: > Hi, > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > 5.2.x is supported only. > > Jens > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > i still found error on 5.1_jens > > Fatal error: Call to a member function on a non-object in > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > postgresql 8.1 > > php4.4 > > > > Debian etch > > > > Dome C. > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > Hi, > > > > > > please have a look at the 5.1_jens branch at first! This is > > > a 5.0.3 release sucessfully running on postgresql. > > > This version is stable. The database fixes were introduced in > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > then. > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > was posted to Richie/Don about 3 weeks ago. > > > > > > JenS > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > * Jens Hamisch schrieb: > > > > > > > > Hi, > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > of last week. > > > > > > > > a) several things in schema create needed to be fixed > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > And the $adb->query_results() thing: > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > I've introduced some new query functions: > > > > > > > > * $adb->run_query_allrecords($query) > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > * $adb->run_query_record($query) > > > > -> returns only the first record. > > > > > > > > * $adb->run_query_field($query,$field) > > > > -> returns given field from the first record > > > > > > > > * $adb->run_query_list($query,$field) > > > > -> returns an list of the values from given field. > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > to an appropriate of the new functions. > > > > > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 12:00:05 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 18:00:05 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 10:22:52PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> Message-ID: <20070502180005.A6711@Strawberry.COM> Hi Richie, didn't Mr. Priebsch tell us something about name space modifications between php 5.1.x and 5.2.0? In fact the version running at my side (php 5.1.4) seems run into problems on 5.2.0 ... Jens On Wed, May 02, 2007 at 10:22:52PM +0700, Dome Charoenyost wrote: > I'm test on php 5.2 found object to string error ( in log->debug) > > when create new contact > Call to a member function Move() on a non-object in > /var/www/crmpgsql/include/database/PearDatabase.php on line 441 > > Dome C. > > On 5/2/07, Jens Hamisch wrote: > > Hi, > > > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > > 5.2.x is supported only. > > > > Jens > > > > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > > i still found error on 5.1_jens > > > Fatal error: Call to a member function on a non-object in > > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > > > postgresql 8.1 > > > php4.4 > > > > > > Debian etch > > > > > > Dome C. > > > > > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > > > Hi, > > > > > > > > please have a look at the 5.1_jens branch at first! This is > > > > a 5.0.3 release sucessfully running on postgresql. > > > > This version is stable. The database fixes were introduced in > > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > > then. > > > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > > was posted to Richie/Don about 3 weeks ago. > > > > > > > > JenS > > > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > > * Jens Hamisch schrieb: > > > > > > > > > > Hi, > > > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > > of last week. > > > > > > > > > > a) several things in schema create needed to be fixed > > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > > > And the $adb->query_results() thing: > > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > > > I've introduced some new query functions: > > > > > > > > > > * $adb->run_query_allrecords($query) > > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > > > * $adb->run_query_record($query) > > > > > -> returns only the first record. > > > > > > > > > > * $adb->run_query_field($query,$field) > > > > > -> returns given field from the first record > > > > > > > > > > * $adb->run_query_list($query,$field) > > > > > -> returns an list of the values from given field. > > > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > > to an appropriate of the new functions. > > > > > > > > > > > > > > > cu > > > > > -- > > > > > --------------------------------------------------------------------- > > > > > Enrico Weigelt == metux IT service > > > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > > fax: +49 36207 519932 email: contact at metux.de > > > > > cellphone: +49 174 7066481 > > > > > --------------------------------------------------------------------- > > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > > --------------------------------------------------------------------- > > > > > _______________________________________________ > > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > > -- > > > > > > > > -------------------------------------------------------------------------------- > > > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > > SSSSS-----SSSSS > > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > > SSSSSSSSS Jens Hamisch > > > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 2 12:31:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 18:31:09 +0200 Subject: [Vtigercrm-developers] insert data function Message-ID: <20070502163109.GA19391@nibiru.local> Hi folks, JFYI: I've added an new function run_insert_data($table,$data) to the PearDatabase lass ($adb). It handles the cases where simply one record is inserted to some table. The sql query is built from an associative array (in fact this is done by sql_insert_data()), executed and if an error is detected, an error is thrown. I'm going to submit an patch this afternoon. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 2 15:13:25 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:13:25 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Hi, Since it is now clear that postgres is supported, the only thing would be about Enrico's opinion of adb->query_results being resource wasting, which is very important regardless of mysql or postgres use, Enrico, what are you doing instead of using the query_results method? About the other thing here is a todo list which could possibly be common with vtiger's: - Use WebWM (webwm.sourceforge.net), instead of porpup windows which are blocked by internet explorer and sometimes firefox, also use WebWM for virtual windows, such as the ones in editing custom fields. - I don't know why imap email doest work, I get the message that email should be configured, even if it is in fact configured, well so i will try to fix that, + adding imap options to the Add user template, - DHTML Customizable pdf sheet creator for sales-orders and the others, - AJAX calendar refresh, and adding standard calendar view on a floating window. - Date field DHTML floating box. - Help DHTML widgets, which will soon be offered by the webwm framework. - Translation facility, probably a script that reads every lang file, and organizes it in a HTML form, and then form it regenerate the lang files, so language translation can be made from web, rather that getting into the code, + the fact of making it a lot more easier when adding new definitions and translating them to the other files. Well with that I think I have lot to play with for some time. Thank you, Jorge On 5/2/07, Jens Hamisch wrote: > > > Hi, > > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... > > Jens > > > On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get > to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/1c28fc7c/attachment-0004.html From joe at tsolucio.com Wed May 2 15:37:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 21:37:14 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <4638E86A.70707@tsolucio.com> Hi Jorge, Jorge Torres escribi?: > Hi, > > Since it is now clear that postgres is supported, the only thing would > be about Enrico's opinion of adb->query_results being resource > wasting, which is very important regardless of mysql or postgres use, > Enrico, what are you doing instead of using the query_results method? > > About the other thing here is a todo list which could possibly be > common with vtiger's: > > - Use WebWM (webwm.sourceforge.net ), > instead of porpup windows which are blocked by internet explorer and > sometimes firefox, also use WebWM for virtual windows, such as the > ones in editing custom fields. > Really nice. Hope you can get somewhere. > - I don't know why imap email doest work, I get the message that email > should be configured, even if it is in fact configured, well so i will > try to fix that, + adding imap options to the Add user template, > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > - AJAX calendar refresh, and adding standard calendar view on a > floating window. > > - Date field DHTML floating box. > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > - Translation facility, probably a script that reads every lang file, > and organizes it in a HTML form, and then form it regenerate the lang > files, so language translation can be made from web, rather that > getting into the code, + the fact of making it a lot more easier when > adding new definitions and translating them to the other files. > Try the Language Wizard in vtigerforge. This is what I use and I think it is a very good module, it does exactly what you are asking for. > Well with that I think I have lot to play with for some time. > > Thank you, > > Jorge > Joe TSolucio From jorge.torres.maldonado at gmail.com Wed May 2 15:59:12 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:59:12 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638E86A.70707@tsolucio.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <4638E86A.70707@tsolucio.com> Message-ID: <530c7d700705021259r4d70223cmd6981af85d4d1360@mail.gmail.com> Thanks Joe, language module seems awesome On 5/2/07, Joe Bordes wrote: > > Hi Jorge, > > Jorge Torres escribi?: > > Hi, > > > > Since it is now clear that postgres is supported, the only thing would > > be about Enrico's opinion of adb->query_results being resource > > wasting, which is very important regardless of mysql or postgres use, > > Enrico, what are you doing instead of using the query_results method? > > > > About the other thing here is a todo list which could possibly be > > common with vtiger's: > > > > - Use WebWM (webwm.sourceforge.net ), > > instead of porpup windows which are blocked by internet explorer and > > sometimes firefox, also use WebWM for virtual windows, such as the > > ones in editing custom fields. > > > Really nice. Hope you can get somewhere. > > > - I don't know why imap email doest work, I get the message that email > > should be configured, even if it is in fact configured, well so i will > > try to fix that, + adding imap options to the Add user template, > > > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > > > - AJAX calendar refresh, and adding standard calendar view on a > > floating window. > > > > - Date field DHTML floating box. > > > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > > > - Translation facility, probably a script that reads every lang file, > > and organizes it in a HTML form, and then form it regenerate the lang > > files, so language translation can be made from web, rather that > > getting into the code, + the fact of making it a lot more easier when > > adding new definitions and translating them to the other files. > > > Try the Language Wizard in vtigerforge. This is what I use and I think > it is a very good module, it does exactly what you are asking for. > > Well with that I think I have lot to play with for some time. > > > > Thank you, > > > > Jorge > > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/3ed19b0a/attachment-0002.html From weigelt at metux.de Wed May 2 22:36:53 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 04:36:53 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <20070503023653.GA29236@nibiru.local> * Jorge Torres schrieb: Hi, > Since it is now clear that postgres is supported, the only thing would be > about Enrico's opinion of adb->query_results being resource wasting, which > is very important regardless of mysql or postgres use, Enrico, what are > you doing instead of using the query_results method? As already said: introduced some new functions, which fetch either one record (run_query_record() and run_query_field()) or all records (run_query_allrecords() and run_query_list()) and simply return the data. There are several result types: a) just one scalar: -> run_query_field($query,$fieldname) --> returns an scalar b) just one record: -> run_query_record($query) --> returns an associative array c) an list of scalars -> run_query_list($query,$fieldname) --> returns an array/list of scalars d) an list of records: -> run_query_allreords($query) --> returns an array/list of ass. arrays cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gopals at vtiger.com Thu May 3 00:26:58 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 03 May 2007 09:56:58 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <1178102159.31989.24.camel@joesunix.int> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> <1178102159.31989.24.camel@joesunix.int> Message-ID: <46396492.7010106@vtiger.com> Hi Joe, Sorry for the inconvenience. We don't have issues in providing separate branches for our developer community. Could you please send us your future development plans to philip at vtiger.com so that he will create branches based on your requirements. Regards, Gopal Joe Bordes wrote: > Hi, > > I read this thread and I just keep asking myself: > what am I doing wrong? > > You guys have branches and are participating. I have been asking to help > for a long time now and I am just being ignored. > > I really would like to help and work together. > > Joe > TSolucio > > El mi??, 02-05-2007 a las 09:49 +0530, Gopal escribi??: > >> Hi Jorge, >> >> Thanks for your interest in vtiger CRM project. >> >> Please see my response below (in blue color) >> >> Jorge Torres wrote: >> >>> Hi everyone, >>> >>> First I want to tell you developers that I admire your work. I first >>> downloaded vtiger a few days ago, for customer relationship >>> management at my uncles little ceramic factory, and I was amazed, >>> but after I showed it to him, well, it seems that it is too much for >>> what my uncle wants. >>> >> Gopal: From the Security settings module, you can disable >> modules/fields that are not required. Please get back to me if you >> need any further clarifications. >> >>> I love PHP, and I thought that I could minimize it to what at this >>> moment I need, and in near future add more AJAX to it. I know that >>> may differ a lot from what vtiger golas might be, therefore I want >>> to start a new project at sourceforge.net based on vtigerCRM 5. >>> >> Gopal: Down the road, we are planning to make vtiger CRM - fully >> customizable so that business users configure the vtiger system >> instead of hacking the code. Could you please post your goals, so >> that we will cross-check our road map and let you know our position? >> >>> I don't understand to much about Open Source Licencing restrictions >>> and related stuff, so please excuse my ignorance. My question are: >>> >> Gopal: vtiger CRM code base contains our own contributions and many >> third-party packages. Our own contributions are released under vtiger >> Public License (based on Mozilla Public License). Please refer to the >> following URL for details about licenses of third-party packages: >> >> http://wiki.vtiger.com/index.php/Third_Party_Software >> >>> Can I start a new project at sourceforge based on vtiger? >>> >> Gopal: In general there are no issues in forking open source projects, >> provided you are not violating the Open Source license of your >> predecessor. >> >>> If so, Would I have to cover it under some other new license type? >>> >> Gopal: Release your contributions under some Open Source license which >> meets your requirements. >> >>> Do I need some permit from vtiger team to start such project? >>> >> Gopal: vtiger CRM code base is 100% open source by spirit. Hence you >> may not require special permission from our side. >> >>> I know about removing logos because of trademarks, what else do I >>> have to remove? >>> >> Gopal: Kindly review the vtiger and other third-party licenses with >> your Legal adviser (council) before modifying back-end/front-end code >> base. >> >> On a separate note, our community is actively participating in vtiger >> development. Most of the community members >> (developers/testers/writers/translators) are directly contributing to >> the core code base (For example: PostgreSQL & DMS branches in our >> SVN). >> >> http://vtiger.fosslabs.com >> >> We are also encouraging many add-on projects based on vtiger CRM, >> which cater to the need of user-specific requirements. For more >> details, please refer to our vtigerForge: >> >> http://vtigerforge.com >> >> Best wishes, >> Gopal >> (vtiger - Team Member) >> >>> Well that's it for now, I will continue on my "trying to understand >>> vtiger's code" task, so I will probably have some questions related >>> to developing in short. >>> >>> Thank you very much, >>> >>> >>> Jorge >>> >>> ____________________________________________________________________ >>> >>> _______________________________________________ >>> Reach hundreds of potential candidates - http://jobs.vtiger.com >>> >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070503/f24f5451/attachment-0004.html From jens at Strawberry.COM Thu May 3 02:54:27 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 08:54:27 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503023653.GA29236@nibiru.local>; from Enrico Weigelt on Thu, May 03, 2007 at 04:36:53AM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> Message-ID: <20070503085427.A9675@Strawberry.COM> Hi Enrico, my fixes adress syntactical postgres support only. However yours also seems to improove performance. Is there any chance to have both fixes implemented (@don,richie)? Jens On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Since it is now clear that postgres is supported, the only thing would be > > about Enrico's opinion of adb->query_results being resource wasting, which > > is very important regardless of mysql or postgres use, Enrico, what are > > you doing instead of using the query_results method? > > As already said: introduced some new functions, which fetch either > one record (run_query_record() and run_query_field()) or all records > (run_query_allrecords() and run_query_list()) and simply return the data. > > There are several result types: > > a) just one scalar: -> run_query_field($query,$fieldname) > --> returns an scalar > b) just one record: -> run_query_record($query) > --> returns an associative array > c) an list of scalars -> run_query_list($query,$fieldname) > --> returns an array/list of scalars > d) an list of records: -> run_query_allreords($query) > --> returns an array/list of ass. arrays > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Thu May 3 08:28:02 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 19:28:02 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Jens, I try to test your branch with lxampp 1.5.3a (php 5.1.4) found same error Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 Please give me more information about php,postgresql version ? Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi Enrico, > > my fixes adress syntactical postgres support only. However > yours also seems to improove performance. Is there any chance > to have both fixes implemented (@don,richie)? > > Jens > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Since it is now clear that postgres is supported, the only thing would be > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > is very important regardless of mysql or postgres use, Enrico, what are > > > you doing instead of using the query_results method? > > > > As already said: introduced some new functions, which fetch either > > one record (run_query_record() and run_query_field()) or all records > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > There are several result types: > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > --> returns an scalar > > b) just one record: -> run_query_record($query) > > --> returns an associative array > > c) an list of scalars -> run_query_list($query,$fieldname) > > --> returns an array/list of scalars > > d) an list of records: -> run_query_allreords($query) > > --> returns an array/list of ass. arrays > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Thu May 3 09:40:04 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:40:04 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503154004.D6711@Strawberry.COM> Hi, my port is running on Solaris 10, postgres 8.1.2, PHP 5.1.4 Jens On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Thu May 3 09:56:34 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:56:34 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503155634.A11877@Strawberry.COM> Hi, I've verfied the 5.1_jens PearDatabase.php to my running version and found no differences. Could you please check the one attached to this mail to the one you're testing against? Kind regards, Jens Hamisch On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 -------------- next part -------------- info("PearDatabse ->".print_r($msg,true)); } else { $log1->info("PearDatabase ->".$msg); } return $msg; } function setDieOnError($value){ $this->dieOnError = $value; } function setDatabaseType($type){ $this->dbType = $type; } function setUserName($name){ $this->userName = $name; } function setOption($name, $value){ if(isset($this->dbOptions)) $this->dbOptions[$name] = $value; if(isset($this->database)) $this->database->setOption($name, $value); } function setUserPassword($pass){ $this->userPassword = $pass; } function setDatabaseName($db){ $this->dbName = $db; } function setDatabaseHost($host){ $this->dbHostName = $host; } function getDataSourceName(){ return $this->dbType. "://".$this->userName.":".$this->userPassword."@". $this->dbHostName . "/". $this->dbName; } function startTransaction() { $this->checkConnection(); $this->println("TRANS Started"); $this->database->StartTrans(); } function completeTransaction() { if($this->database->HasFailedTrans()) $this->println("TRANS Rolled Back"); else $this->println("TRANS Commited"); $this->database->CompleteTrans(); $this->println("TRANS Completed"); } /* ADODB converted * function checkError($msg='', $dieOnError=false) * { * if($this->dbType == "mysql") * { * if (mysql_errno()) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } * return false; * } * else * { * if(!isset($this->database)) * { * $this->log->error("Database Is Not Connected"); * return true; * } * if(DB::isError($this->database)) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal($msg.$this->database->getMessage()); * die ($msg.$this->database->getMessage()); * } else { * $this->log->error($msg.$this->database->getMessage()); * } * return true; * } * } * return false; * } */ function checkError($msg='', $dieOnError=false) { /* * if($this->database->ErrorNo()) * { * if($this->dieOnError || $dieOnError) * { * $this->println("ADODB error ".$this->database->ErrorNo()); * die ($msg."ADODB error ".$this->database->ErrorNo()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } */ if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); die ($msg."ADODB error ".$msg."->".$this->database->ErrorMsg()); } else { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); } return false; } function change_key_case($arr) { return is_array($arr)?array_change_key_case($arr):$arr; } var $req_flist; /** * @return void * @desc checks if a connection exists if it does not it closes the connection * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. * All Rights Reserved.. * Contributor(s): ______________________________________.. */ function checkConnection(){ global $log; if(!isset($this->database)) { $this->println("TRANS creating new connection"); /* * $flist=get_included_files(); * foreach($flist as $key=>$value) * { * if(!strstr($value,'\\modules') && !strstr($value,'\\data')) * unset($flist[$key]); * } * $this->println($flist); */ $this->connect(false); } else { //$this->println("checkconnect using old connection"); } } /* ADODB converted * function query($sql, $dieOnError=false, $msg='') * { * $this->println("query ".$sql); * $this->log->info('Query:' . $sql); * $this->checkConnection(); * $this->query_time = microtime(); * if($this->dbType == "mysql") * { * $result =& mysql_query($sql); * $this->lastmysqlrow = -1; * } else { * $result =& $this->database->query($sql); * } * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function query($sql, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB query ".$sql); $log->debug('query being executed : '.$sql); $this->checkConnection(); $result = & $this->database->Execute($sql); $this->lastmysqlrow = -1; if(!$result)$this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); return $result; } function getEmptyBlob() { //if(dbType=="oci8") return 'empty_blob()'; //else return 'null'; return 'null'; } function updateBlob($tablename, $colname, $id, $data) { $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id); $this->checkConnection(); $result = $this->database->UpdateBlob($tablename, $colname, $data, $id); $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id." status=".$result); return $result; } function updateBlobFile($tablename, $colname, $id, $filename) { $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename); $this->checkConnection(); $result = $this->database->UpdateBlobFile($tablename, $colname, $filename, $id); $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename." status=".$result); return $result; } /* ADODB converted * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') * { * if($this->dbType == "mysql") * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); * $this->lastsql = $sql; * * $this->checkConnection(); * $this->query_time = microtime(); * $result =& $this->database->limitQuery($sql,$start, $count); * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count); $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count); $this->checkConnection(); $result =& $this->database->SelectLimit($sql,$count,$start); if(!$result) $this->checkError($msg.' Limit Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getOne($sql, $dieOnError=false, $msg='') * { * $this->log->info('Get One:' . $sql); * $this->checkConnection(); * if($this->dbType == "mysql"){ * $queryresult =& $this->query($sql, $dieOnError, $msg); * $result =& mysql_result($queryresult,0); * } else { * $result =& $this->database->getOne($sql); * } * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); $this->checkConnection(); $result =& $this->database->GetOne($sql); if(!$result) $this->checkError($msg.' Get one Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getFieldsArray(&$result) * { * $field_array = array(); * * if(! isset($result) || empty($result)) * { * return 0; * } * * if($this->dbType == "mysql") * { * $i = 0; * while ($i < mysql_num_fields($result)) * { * $meta = mysql_fetch_field($result, $i); * * if (!$meta) * { * return 0; * } * * array_push($field_array,$meta->name); * * $i++; * } * } * else * { * $arr = tableInfo($result); * foreach ($arr as $index=>$subarr) * { * array_push($field_array,$subarr['name']); * } * } * * return $field_array; * } */ function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); $field_array = array(); if(! isset($result) || empty($result)) { return 0; } $i = 0; $n = $result->FieldCount(); while ($i < $n) { $meta = $result->FetchField($i); if (!$meta) { return 0; } array_push($field_array,$meta->name); $i++; } //$this->println($field_array); return $field_array; } /* ADODB Converted * function getRowCount(&$result) * { * if(isset($result) && !empty($result)) * if($this->dbType == "mysql"){ * return mysql_numrows($result); * } else { * return $result->numRows(); * } * return 0; * } */ function getRowCount(&$result){ global $log; //$this->println("ADODB getRowCount"); if(isset($result) && !empty($result)) $rows= $result->RecordCount(); //$this->println("ADODB getRowCount rows=".$rows); //$log->debug('getRowCount rows= '.$rows); return $rows; } /* ADODB newly added. replacement for mysql_num_rows */ function num_rows(&$result) { return $this->getRowCount($result); } /* ADODB newly added. replacement form mysql_num_fields */ function num_fields(&$result) { return $result->FieldCount(); } /* ADODB newly added. replacement for mysql_fetch_array() */ function fetch_array(&$result) { if($result->EOF) { //$this->println("ADODB fetch_array return null"); return NULL; } return $this->change_key_case($result->FetchRow()); } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); //Commented strip_selected_tags and added to_html function for HTML tags vulnerability //$coldata = strip_selected_tags($rowdata[$col],'script'); $coldata = to_html($rowdata[$col]); //$this->println("ADODB query_result ". $coldata); return $coldata; } /* ADODB Converted * function getAffectedRowCount(&$result) * { * if($this->dbType == "mysql"){ * return mysql_affected_rows(); * } * else { * return $result->affectedRows(); * } * return 0; * } */ function getAffectedRowCount(&$result) { global $log; //$this->println("ADODB getAffectedRowCount"); $log->debug('getAffectedRowCount'); $rows =$this->database->Affected_Rows(); //$this->println("ADODB getAffectedRowCount rows=".rows); $log->debug('getAffectedRowCount rows = '.$rows); return $rows; } /* ADODB converted * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ * $result = $this->query($sql, $dieOnError, $msg); * * if($this->getRowCount($result ) == 1) * return to_html($result, $encode); * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); * return ''; * } */ function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); if($this->getRowCount($result ) == 1) return $result; $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } /* ADODB converted * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) * { * if(isset($result) && $rowNum < 0) * { * if($this->dbType == "mysql"){ * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); * } * if($this->dbType == "mysql"){ * if($this->getRowCount($result) > $rowNum){ * mysql_data_seek($result, $rowNum); * } * $this->lastmysqlrow = $rowNum; * * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); * if($encode) * return array_map('to_html', $row); * return $row; * } */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { //$this->println("ADODB fetchByAssoc ".$rowNum." fetch mode=".$adb->database->$ADODB_FETCH_MODE); if($result->EOF) { $this->println("ADODB fetchByAssoc return null"); return NULL; } if(isset($result) && $rowNum < 0) { $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); //$this->println("ADODB fetchByAssoc r< 0 isarray r=".is_array($row)." r1=".is_array($row[1])); //$this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); //$this->println("ADODB fetchByAssoc r< 0 not array r1=".$row[1]); return $row; } //$this->println("ADODB fetchByAssoc after if ".$rowNum); if($this->getRowCount($result) > $rowNum) { $result->Move($rowNum); } $this->lastmysqlrow = $rowNum; //srini - think about this $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); $this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); return $row; } /* ADODB converted * function getNextRow(&$result, $encode=true) * { * if(isset($result)){ * $row = $result->fetchRow(); * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * return null; * } */ function getNextRow(&$result, $encode=true){ global $log; //$this->println("ADODB getNextRow"); $log->info('getNextRow'); if(isset($result)){ $row = $this->change_key_case($result->FetchRow()); if($row && $encode&& is_array($row)) return array_map('to_html', $row); return $row; } return null; } function fetch_row(&$result, $encode=true) { return $this->getNextRow($result); } function field_name(&$result, $col) { return $result->FetchField($col); } function getQueryTime(){ return $this->query_time; } /* * function execute($stmt, $data, $dieOnError=false, $msg=''){ * $this->log->info('Executing:'.$stmt); * $this->checkConnection(); * $this->query_time = microtime(); * $prepared = $this->database->prepare($stmt); * $result = execute($stmt, $data); * $this->query_time = microtime() - $this->query_time; * //$this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); * return $result; * } */ /* adodb converted * function connect($dieOnError = false){ * $this->println("connect"); * global $dbconfigoption; * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); * @mysql_select_db($this->dbName) or die( "Unable to select database"); * if(!$this->database){ * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); * if($this->connection == false && $dbconfigoption['persistent'] == true){ * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; * } * } * } * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); * if($this->checkError('Could Not Connect:', $dieOnError)) * $this->log->info("connected to db"); * * } */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); /* * $driver='mysql'; * $server='srinivasan'; * $user='root'; * $password=''; * $database='vtigercrm3_2'; * * $this->database = ADONewConnection($driver); * * #$this->database->debug = true; * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); */ /* * $this->dbHostName="srinivasan:1521"; * $this->userName="vt4"; * $this->userPassword="vt4"; * $this->dbName="srini"; * $this->dbType="oci8"; */ if(!isset($this->dbType)) { $this->println("ADODB Connect : DBType not specified"); return; } $this->database = ADONewConnection($this->dbType); //$this->database->debug = true; $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName); $this->database->LogSQL($this->enableSQLlog); //$this->database->SetFetchMode(ADODB_FETCH_ASSOC); //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } /* * function PearDatabase(){ * //$this->println("PearDatabase"); * global $currentModule; * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); * $this->resetSettings(); * } * * function resetSettings(){ * global $dbconfig, $dbconfigoption; * $this->disconnect(); * $this->setDatabaseType($dbconfig['db_type']); * $this->setUserName($dbconfig['db_username']); * $this->setUserPassword($dbconfig['db_password']); * $this->setDatabaseHost( $dbconfig['db_hostname']); * $this->setDatabaseName($dbconfig['db_name']); * $this->dbOptions = $dbconfigoption; * $this->enableSQLlog = ($dbconfig['log_sql'] == true); * //$this->println("resetSettings log=".$this->enableSQLlog); * //$this->println($dbconfig); * //if($this->dbType != "mysql"){ * // require_once( 'DB.php' ); * //} * } */ function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); global $currentModule; $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); $this->resetSettings($dbtype,$host,$dbname,$username,$passwd); } function resetSettings($dbtype,$host,$dbname,$username,$passwd) { global $dbconfig, $dbconfigoption; if($host == '') { $this->disconnect(); $this->setDatabaseType($dbconfig['db_type']); $this->setUserName($dbconfig['db_username']); $this->setUserPassword($dbconfig['db_password']); $this->setDatabaseHost( $dbconfig['db_hostname']); $this->setDatabaseName($dbconfig['db_name']); $this->dbOptions = $dbconfigoption; if($dbconfig['log_sql']) $this->enableSQLlog = ($dbconfig['log_sql'] == true); //$this->println("resetSettings log=".$this->enableSQLlog); //$this->println($dbconfig); /*if($this->dbType != "mysql"){ require_once( 'DB.php' ); }*/ } else { $this->disconnect(); $this->setDatabaseType($dbtype); $this->setDatabaseName($dbname); $this->setUserName($username); $this->setUserPassword($passwd); $this->setDatabaseHost( $host); } } function quote($string){ return $this->database->qstr($string); } /* ADODB converted * function disconnect() { * $this->println("disconnect"); * if(isset($this->database)){ * if($this->dbType == "mysql"){ * mysql_close($this->database); * } else { * $this->database->disconnect(); * } * unset($this->database); * } * } */ function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ if($this->dbType == "mysql"){ mysql_close($this->database); } else { $this->database->disconnect(); } unset($this->database); } } function setDebug($value) { $this->database->debug = $value; } // ADODB newly added methods function createTables($schemaFile, $dbHostName=false, $userName=false, $userPassword=false, $dbName=false, $dbType=false) { $this->println("ADODB createTables ".$schemaFile); if($dbHostName!=false) $this->dbHostName=$dbHostName; if($userName!=false) $this->userName=$userPassword; if($userPassword!=false) $this->userPassword=$userPassword; if($dbName!=false) $this->dbName=$dbName; if($dbType!=false) $this->dbType=$dbType; //$db = ADONewConnection($this->dbType); $this->checkConnection(); $db = $this->database; //$db->debug = true; //$this->println("ADODB createTables connect status=".$db->Connect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName)); $schema = new adoSchema( $db ); //Debug Adodb XML Schema $sehema->XMLS_DEBUG = TRUE; //Debug Adodb $sehema->debug = true; $sql = $schema->ParseSchema( $schemaFile ); $this->println("--------------Starting the table creation------------------"); //$this->println($sql); //integer ExecuteSchema ([array $sqlArray = NULL], [boolean $continueOnErr = NULL]) $result = $schema->ExecuteSchema( $sql, true ); if($result) print $db->errorMsg(); // needs to return in a decent way $this->println("ADODB createTables ".$schemaFile." status=".$result); return $result; } function createTable($tablename, $flds) { $this->println("ADODB createTable table=".$tablename." flds=".$flds); $this->checkConnection(); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $dict = NewDataDictionary($this->database); $sqlarray = $dict->CreateTableSQL($tablename, $flds); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB createTable table=".$tablename." flds=".$flds." status=".$result); return $result; } function alterTable($tablename, $flds, $oper) { $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $this->checkConnection(); $dict = NewDataDictionary($this->database); //$sqlarray = new Array(); if($oper == 'Add_Column') { $sqlarray = $dict->AddColumnSQL($tablename, $flds); } else if($oper == 'Delete_Column') { $sqlarray = $dict->DropColumnSQL($tablename, $flds); } $this->println("sqlarray"); $this->println($sqlarray); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper." status=".$result); return $result; } function getColumnNames($tablename) { $this->println("ADODB getColumnNames table=".$tablename); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); //$colNames = new Array(); $i=0; foreach($adoflds as $fld) { $colNames[$i] = $fld->name; $i++; } return $colNames; } function formatString($tablename,$fldname, $str) { //$this->println("ADODB formatString table=".$tablename." fldname=".$fldname." str=".$str); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); foreach ( $adoflds as $fld ) { //$this->println("ADODB formatString adofld =".$fld->name); if(strcasecmp($fld->name,$fldname)==0) { //$this->println("ADODB formatString fldname=".$fldname." fldtype =".$fld->type); $fldtype =strtoupper($fld->type); if(strcmp($fldtype,'CHAR')==0 || strcmp($fldtype,'VARCHAR') == 0 || strcmp($fldtype,'VARCHAR2') == 0 || strcmp($fldtype,'LONGTEXT')==0 || strcmp($fldtype,'TEXT')==0) { //$this->println("ADODB return else normal"); return $this->database->Quote($str); } else if(strcmp($fldtype,'DATE') ==0 || strcmp($fldtype,'TIMESTAMP')==0) { return $this->formatDate($str); } else { return $str; } } } $this->println("format String Illegal field name ".$fldname); return $str; } function formatDate($datetime) { $this->checkConnection(); //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); //if($db->dbType=='mysql') return $this->quote($date); return $date; } function getDBDateString($datecolname) { $this->checkConnection(); $db = &$this->database; $datestr = $db->SQLDate("Y-m-d, H:i:s" ,$datecolname); return $datestr; } function getUniqueID($seqname) { global $log; $this->checkConnection(); if( $this->dbType == "pgsql") { $keytab = $this->database->MetaPrimaryKeys($seqname); if( count( $keytab) > 0) { $log->info("PearDatabase: Postgres getUniqueID hack: ".$seqname."_".$keytab[0]."_seq"); return $this->database->GenID($seqname."_".$keytab[0]."_seq",1); } else { $log->info("PearDatabase: Problem: getUniqueID but no key for '$seqname'"); } } return $this->database->GenID($seqname."_seq",1); } function get_tables() { $this->checkConnection(); $result = & $this->database->MetaTables('TABLES'); $this->println($result); return $result; } } /* End of class */ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); ?> From dome at tel.co.th Thu May 3 10:40:59 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 21:40:59 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503155634.A11877@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> <20070503155634.A11877@Strawberry.COM> Message-ID: <8ccbff060705030740u1f6df32cjd133c656035acfe8@mail.gmail.com> Same problem. when create contact Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 When create new note Warning: mktime() expects parameter 6 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1388 Warning: mktime() expects parameter 1 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1389 Setting->orgunit Fatal error: Call to undefined method OrgUnit::getListQuery() in /opt/lampp/htdocs/vtiger/include/utils/ListViewUtils.php on line 2388 Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi, > > I've verfied the 5.1_jens PearDatabase.php to my running version > and found no differences. Could you please check the one attached to > this mail to the one you're testing against? > > Kind regards, > Jens Hamisch > > On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > > Jens, > > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > > found same error > > Fatal error: Call to a member function Move() on a non-object in > > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > > > Please give me more information about php,postgresql version ? > > > > Dome C. > > > > On 5/3/07, Jens Hamisch wrote: > > > > > > Hi Enrico, > > > > > > my fixes adress syntactical postgres support only. However > > > yours also seems to improove performance. Is there any chance > > > to have both fixes implemented (@don,richie)? > > > > > > Jens > > > > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > > > > > > Hi, > > > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > > you doing instead of using the query_results method? > > > > > > > > As already said: introduced some new functions, which fetch either > > > > one record (run_query_record() and run_query_field()) or all records > > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > > > There are several result types: > > > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > > --> returns an scalar > > > > b) just one record: -> run_query_record($query) > > > > --> returns an associative array > > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > > --> returns an array/list of scalars > > > > d) an list of records: -> run_query_allreords($query) > > > > --> returns an array/list of ass. arrays > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > From weigelt at metux.de Thu May 3 12:24:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:24:44 +0200 Subject: [Vtigercrm-developers] [PATCH] new functions and some cleanups Message-ID: <20070503162443.GA22625@nibiru.local> Hi folks, here are some patches (against latest trunk), which introduce the new functions and so some cleanups. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- ## ## takes db_port directly from the request variable, since register_globals ## is disabled most times and deprecated. ## diff -ruN upstream-10823/install/4createConfigFile.php working/install/4createConfigFile.php --- upstream-10823/install/4createConfigFile.php 2007-05-03 17:42:54.000000000 +0200 +++ working/install/4createConfigFile.php 2007-05-03 17:53:31.000000000 +0200 @@ -58,11 +58,14 @@ else { $db_hostname = $_REQUEST['db_hostname']; - if($db_type == "pgsql") - $db_port = '5432'; - else - $db_port = '3306'; - } + switch($_REQUEST{'db_type'}) + { + case 'pgsql': $db_port = '5432'; break; + case 'mysql': $db_port = '3306'; break; + default: + throw new Exception("unsupported db_type: \""+$_REQUEST{'db_type'}."\""); + } + } } if (isset($_REQUEST['db_username']))$db_username = $_REQUEST['db_username']; ## ## fixes error w/ duplicated class definitions. not sure if this is really correct ;-O ## diff -ruN upstream-10823/modules/Calendar/Date.php working/modules/Calendar/Date.php --- upstream-10823/modules/Calendar/Date.php 2007-05-03 17:43:39.000000000 +0200 +++ working/modules/Calendar/Date.php 2007-05-03 17:53:31.000000000 +0200 @@ -9,7 +9,7 @@ * ********************************************************************************/ -class DateTime +class X_DateTime { var $second = '00'; var $minute = '00'; -------------- next part -------------- ## ## adds new functions to the PearDatabase class to come around the whole ## broken query_result() idea ;-O ## diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 17:50:00.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:10:05.000000000 +0200 @@ -433,6 +433,144 @@ } return $this->change_key_case($result->FetchRow()); } + function run_query_record_html($query) + { + if (!is_array($rec = $this->run_query_record($query))) +// throw new Exception("no rec: $query"); + return $rec; + + foreach ($rec as $walk => $cur) + $r[$walk] = to_html($cur); + + return $r; + } + + function sql_quote($data) + { + if (is_array($data)) + { + switch($data{'type'}) + { + case 'text': + case 'numeric': + case 'integer': + case 'oid': + return $this->quote($data{'value'}); + break; + case 'timestamp': + return $this->formatDate($data{'value'}); + break; + default: + throw new Exception("unhandled type: ".serialize($cur)); + } + } + else + return $this->quote($data); + } + + function sql_insert_data($table, $data) + { + if (!$table) + throw new Exception("missing table name"); + if (!is_array($data)) + throw new Exception("data must be an array"); + if (!count($table)) + throw new Exception("no data given"); + + $sql_fields = ''; + $sql_data = ''; + foreach($data as $walk => $cur) + { + $sql_fields .= ($sql_fields?',':'').$walk; + $sql_data .= ($sql_data?',':'').$this->sql_quote($cur); + } + + return 'INSERT INTO '.$table.' ('.$sql_fields.') VALUES ('.$sql_data.')'; + } + + function run_insert_data($table,$data) + { + $query = $this->sql_insert_data($table,$data); + $res = $this->query($query); + $this->query("commit;"); + } + + function run_query_record($query) + { + $result = $this->query($query); + if (!$result) + return; +// throw new Exception("empty result !"); + + if (!is_object($result)) + throw new Exception("query \"$query\" failed: ".serialize($result)); + $res = $result->FetchRow(); + $rowdata = $this->change_key_case($res); + return $rowdata; + } + + function run_query_allrecords($query) + { + $result = $this->query($query); + $records = array(); + $sz = $this->num_rows($result); + for ($i=0; $i<$sz; $i++) + $records[$i] = $this->change_key_case($result->FetchRow()); + return $records; + } + + function run_query_field($query,$field) + { + $rowdata = $this->run_query_record($query); + return $rowdata{$field}; + } + + function run_query_list($query,$field) + { + $records = $this->run_query_allrecords($query); + foreach($records as $walk => $cur) + $list[] = $cur{$field}; + } + + function run_query_field_html($query,$field) + { + return to_html($this->run_query_field($query,$field)); + } + + function result_get_next_record($result) + { + return $this->change_key_case($result->FetchRow()); + } + + // create an IN expression from an array/list + function sql_expr_datalist($a) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur); + + return ' ( '.$l.' ) '; + } + + // create an IN expression from an record list, take $field within each record + function sql_expr_datalist_from_records($a,$field) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!$field) + throw new Exception("missing field"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur{$field}); + + return ' ( '.$l.' ) '; + } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) -------------- next part -------------- diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 18:13:24.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:17:22.000000000 +0200 @@ -104,46 +104,6 @@ $this->println("TRANS Completed"); } -/* ADODB converted - * function checkError($msg='', $dieOnError=false) - * { - * if($this->dbType == "mysql") - * { - * if (mysql_errno()) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); - * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); - * } else { - * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); - * } - * return true; - * } - * return false; - * } - * else - * { - * if(!isset($this->database)) - * { - * $this->log->error("Database Is Not Connected"); - * return true; - * } - * if(DB::isError($this->database)) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal($msg.$this->database->getMessage()); - * die ($msg.$this->database->getMessage()); - * } else { - * $this->log->error($msg.$this->database->getMessage()); - * } - * return true; - * } - * } - * return false; - * } - */ function checkError($msg='', $dieOnError=false) { @@ -160,7 +120,7 @@ * return true; * } */ - + if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); @@ -268,24 +228,6 @@ return $result; } -/* ADODB converted - * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') - * { - * if($this->dbType == "mysql") - * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); - * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); - * $this->lastsql = $sql; - * - * $this->checkConnection(); - * $this->query_time = microtime(); - * $result =& $this->database->limitQuery($sql,$start, $count); - * $this->query_time = microtime() - $this->query_time; - * $this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; @@ -297,22 +239,6 @@ return $result; } -/* ADODB converted - * function getOne($sql, $dieOnError=false, $msg='') - * { - * $this->log->info('Get One:' . $sql); - * $this->checkConnection(); - * if($this->dbType == "mysql"){ - * $queryresult =& $this->query($sql, $dieOnError, $msg); - * $result =& mysql_result($queryresult,0); - * } else { - * $result =& $this->database->getOne($sql); - * } - * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); @@ -322,46 +248,6 @@ return $result; } -/* ADODB converted - * function getFieldsArray(&$result) - * { - * $field_array = array(); - * - * if(! isset($result) || empty($result)) - * { - * return 0; - * } - * - * if($this->dbType == "mysql") - * { - * $i = 0; - * while ($i < mysql_num_fields($result)) - * { - * $meta = mysql_fetch_field($result, $i); - * - * if (!$meta) - * { - * return 0; - * } - * - * array_push($field_array,$meta->name); - * - * $i++; - * } - * } - * else - * { - * $arr = tableInfo($result); - * foreach ($arr as $index=>$subarr) - * { - * array_push($field_array,$subarr['name']); - * } - * } - * - * return $field_array; - * } - */ - function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); @@ -586,19 +472,6 @@ return $coldata; } -/* ADODB Converted - * function getAffectedRowCount(&$result) - * { - * if($this->dbType == "mysql"){ - * return mysql_affected_rows(); - * } - * else { - * return $result->affectedRows(); - * } - * return 0; - * } - */ - function getAffectedRowCount(&$result) { global $log; @@ -610,17 +483,6 @@ return $rows; } -/* ADODB converted - * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ - * $result = $this->query($sql, $dieOnError, $msg); - * - * if($this->getRowCount($result ) == 1) - * return to_html($result, $encode); - * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); - * return ''; - * } - */ - function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); @@ -630,40 +492,6 @@ $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } - - -/* ADODB converted - * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) - * { - * if(isset($result) && $rowNum < 0) - * { - * if($this->dbType == "mysql"){ - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); - * } - * if($this->dbType == "mysql"){ - * if($this->getRowCount($result) > $rowNum){ - * mysql_data_seek($result, $rowNum); - * } - * $this->lastmysqlrow = $rowNum; - * - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); - * if($encode) - * return array_map('to_html', $row); - * return $row; - * } - */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { @@ -703,20 +531,7 @@ return array_map('to_html', $row); return $row; } - -/* ADODB converted - * function getNextRow(&$result, $encode=true) - * { - * if(isset($result)){ - * $row = $result->fetchRow(); - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * return null; - * } - */ - + function getNextRow(&$result, $encode=true){ global $log; @@ -744,69 +559,12 @@ function getQueryTime(){ return $this->query_time; } - -/* - * function execute($stmt, $data, $dieOnError=false, $msg=''){ - * $this->log->info('Executing:'.$stmt); - * $this->checkConnection(); - * $this->query_time = microtime(); - * $prepared = $this->database->prepare($stmt); - * $result = execute($stmt, $data); - * $this->query_time = microtime() - $this->query_time; - * //$this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); - * return $result; - * } - */ - - -/* adodb converted - * function connect($dieOnError = false){ - * $this->println("connect"); - * global $dbconfigoption; - * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ - * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); - * @mysql_select_db($this->dbName) or die( "Unable to select database"); - * if(!$this->database){ - * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); - * if($this->connection == false && $dbconfigoption['persistent'] == true){ - * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; - * } - * } - * } - * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); - * if($this->checkError('Could Not Connect:', $dieOnError)) - * $this->log->info("connected to db"); - * - * } - */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); - -/* - * $driver='mysql'; - * $server='srinivasan'; - * $user='root'; - * $password=''; - * $database='vtigercrm3_2'; - * - * $this->database = ADONewConnection($driver); - * - * #$this->database->debug = true; - * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); - */ - -/* - * $this->dbHostName="srinivasan:1521"; - * $this->userName="vt4"; - * $this->userPassword="vt4"; - * $this->dbName="srini"; - * $this->dbType="oci8"; - */ if(!isset($this->dbType)) { @@ -823,32 +581,6 @@ //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } -/* - * function PearDatabase(){ - * //$this->println("PearDatabase"); - * global $currentModule; - * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); - * $this->resetSettings(); - * } - * - * function resetSettings(){ - * global $dbconfig, $dbconfigoption; - * $this->disconnect(); - * $this->setDatabaseType($dbconfig['db_type']); - * $this->setUserName($dbconfig['db_username']); - * $this->setUserPassword($dbconfig['db_password']); - * $this->setDatabaseHost( $dbconfig['db_hostname']); - * $this->setDatabaseName($dbconfig['db_name']); - * $this->dbOptions = $dbconfigoption; - * $this->enableSQLlog = ($dbconfig['log_sql'] == true); - * //$this->println("resetSettings log=".$this->enableSQLlog); - * //$this->println($dbconfig); - * //if($this->dbType != "mysql"){ - * // require_once( 'DB.php' ); - * //} - * } - */ - function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); @@ -893,21 +625,6 @@ return $this->database->qstr($string); } - -/* ADODB converted - * function disconnect() { - * $this->println("disconnect"); - * if(isset($this->database)){ - * if($this->dbType == "mysql"){ - * mysql_close($this->database); - * } else { - * $this->database->disconnect(); - * } - * unset($this->database); - * } - * } - */ - function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ @@ -1054,7 +771,6 @@ //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); - //if($db->dbType=='mysql') return $this->quote($date); return $date; } @@ -1083,6 +799,3 @@ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); - - -?> From weigelt at metux.de Thu May 3 12:33:22 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:33:22 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <20070503163322.GB22625@nibiru.local> * Jens Hamisch schrieb: Hi Enrico, > my fixes adress syntactical postgres support only. I'll have a look at it. Could you please give me some quick cmdline to fetch it (I'm not really experienced w/ svn) or an patch against latest release or trunk ? > However yours also seems to improove performance. Is there any > chance to have both fixes implemented (@don,richie) ? Well, let's try it step by step :) I've posted a first set of patches some mins ago. They should not break anything, just add the new functions and clean up old comments, etc. Would be great if you could check them if they fit your branch. IMHO they should be good enough to get into upstream quickly. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Thu May 3 12:48:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:48:09 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... Message-ID: <20070503164809.GA13215@nibiru.local> Hi folks, I've got lots of cases where PHP spits out an error message like: "Catchable fatal error: Object of class Accounts could not be converted to string in ....." This is triggered by the $log->debug() calls at the head of many functions, where an log message is cat'ed from the parameters. Obviously PHP does not know what to do with objects if they should be accessed as strings. No idea if there's an option for controlling that or whether it depends on the PHP version. For now I simply comment out these lines at my site, but that's proably not the solution. How can we cope with these cases ? Write an generic ObjToString() function which handles that (checks if its an object and then prints proper info, etc) or add an toString() method to all classes ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Thu May 3 14:03:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Thu, 03 May 2007 20:03:14 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... In-Reply-To: <20070503164809.GA13215@nibiru.local> References: <20070503164809.GA13215@nibiru.local> Message-ID: <463A23E2.9000603@tsolucio.com> Hi, All entities (except Users) inherit from crmentity, so what I do is add the toString function in data/crmentity.php to avoid the error. Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > I've got lots of cases where PHP spits out an error message like: > > "Catchable fatal error: Object of class Accounts could not > be converted to string in ....." > > This is triggered by the $log->debug() calls at the head of many > functions, where an log message is cat'ed from the parameters. > Obviously PHP does not know what to do with objects if they > should be accessed as strings. No idea if there's an option for > controlling that or whether it depends on the PHP version. > > For now I simply comment out these lines at my site, but that's > proably not the solution. > > How can we cope with these cases ? > > Write an generic ObjToString() function which handles that > (checks if its an object and then prints proper info, etc) > or add an toString() method to all classes ? > > > cu > From weigelt at metux.de Fri May 4 10:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 4 May 2007 16:47:48 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! Message-ID: <20070504144747.GB14102@nibiru.local> Hi folks, I'm currently trying out the 5.1_jens branch. It seems really broken :(( a) I had to add __toString() methods to certain objects b) The getOrgUnits() function is missing. I couldn't find anything about it on the web. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Sat May 5 14:28:16 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Sat, 5 May 2007 20:28:16 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070504144747.GB14102@nibiru.local>; from Enrico Weigelt on Fri, May 04, 2007 at 04:47:48PM +0200 References: <20070504144747.GB14102@nibiru.local> Message-ID: <20070505202816.A19389@Strawberry.COM> Hi, I'm going to have a look at this. The branch is just a copy of the definitely productive version I'm running here. Is there any limit on your (personal) mailbox? I may send an TAR archive to you ... Jens On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I'm currently trying out the 5.1_jens branch. > It seems really broken :(( > > a) I had to add __toString() methods to certain objects > > b) The getOrgUnits() function is missing. I couldn't find anything > about it on the web. > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Sat May 5 17:11:07 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Sun, 6 May 2007 04:11:07 +0700 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <8ccbff060705051411s2f06c50aufa1549505a3f018e@mail.gmail.com> send me please dome at tel.co.th Thanks Dome C. On 5/6/07, Jens Hamisch wrote: > > Hi, > > > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... > > > Jens > > > On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > > > Hi folks, > > > > > > I'm currently trying out the 5.1_jens branch. > > It seems really broken :(( > > > > a) I had to add __toString() methods to certain objects > > > > b) The getOrgUnits() function is missing. I couldn't find anything > > about it on the web. > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From weigelt at metux.de Sun May 6 11:54:04 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Sun, 6 May 2007 17:54:04 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <20070506155404.GA18277@nibiru.local> * Jens Hamisch schrieb: Hi, > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... Okay, go ahead :) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 08:57:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 14:57:28 +0200 Subject: [Vtigercrm-developers] 1/2 OT: diff + skip files Message-ID: <20070507125728.GA999@nibiru.local> Hi folks, could anyone give me an tip how to skip certain files on diff ? I'm currently merging jens' personal copy with the 5.1_jens branch from SVN and there are lots of autogenerated files, which should be skipped (to reduce manual work on the diffs). cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 09:01:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 15:01:49 +0200 Subject: [Vtigercrm-developers] jens' tree vs 5.1_jens Message-ID: <20070507130149.GB999@nibiru.local> Hi folks, Jens has sent me his personal tree (which he considered stable). There're a lot of differences to the 5.1_jens branch in SVN. I'm currently working on merging his changes and putting them into a couple of patch files. Would be great if they'd go into SVN very soon. In the next step we should merge this branch with the current trunk. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 14:00:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 20:00:41 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount Message-ID: <20070508180041.GA4205@nibiru.local> Hi folks, while just filing an invoice, I got into big trouble: It refuses non-integer amounts ! For service billing this is really bad. You can't assume, all works are done in an hourly raster. How can I fix this ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Tue May 8 14:47:20 2007 From: joe at tsolucio.com (Joe Bordes) Date: Tue, 08 May 2007 20:47:20 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <20070508180041.GA4205@nibiru.local> References: <20070508180041.GA4205@nibiru.local> Message-ID: <4640C5B8.2010601@tsolucio.com> Hi, Look in the forums/wiki, it has something to do with changing the type of a field in vtiger_inventoryproductrel Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > while just filing an invoice, I got into big trouble: > It refuses non-integer amounts ! > > For service billing this is really bad. You can't assume, all > works are done in an hourly raster. > > How can I fix this ? > > > cu > From weigelt at metux.de Tue May 8 15:01:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:01:07 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <4640C5B8.2010601@tsolucio.com> References: <20070508180041.GA4205@nibiru.local> <4640C5B8.2010601@tsolucio.com> Message-ID: <20070508190106.GA17322@nibiru.local> * Joe Bordes schrieb: Hi, > Look in the forums/wiki, it has something to do with changing > the type of a field in vtiger_inventoryproductrel why the hell the quantity an int instead of numeric ?! In which places do I have to change it to fix it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:34:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:34:33 +0200 Subject: [Vtigercrm-developers] RFC: schema versioning Message-ID: <20070508193433.GB17322@nibiru.local> Hi folks, as some of you probably might have realized that upgrading database schema is an very tricky issue. I don't believe that an universal schema generator and updater, which really *WORKS* can be built with reasonable effort, at least not if the RDBMS should not just be abused as spreadsheet storage. The various RDBMS'es *are* different and so require different schemata. The big problem is not writing proper SQL commands, but keeping track of current schema version and find the right commands for update. So my suggestion: * add an new table "schema_version" which contains an list of schema components (identified by some unique name) and their current version (which is an sequential number). * schema updates are done, for each component separately, strictly sequential. each RDBMS has its own SQL scripts. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:41:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:41:33 +0200 Subject: [Vtigercrm-developers] [BUG] Invoice: Disturbing noise when w/ multiple articles of same type Message-ID: <20070508194133.GC17322@nibiru.local> Hi folks, why does it give this disturbing noise when putting multiple artiles of the same type on one invoice ? For services this is really ugly. Obviously you don't have an separate product for every little piece you've done for the customer. The article is simply working time, amount of "1" means 1 hour ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:48:03 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:48:03 +0200 Subject: [Vtigercrm-developers] Requesting trac access Message-ID: <20070508194803.GD17322@nibiru.local> Hi folks, as I'm currenly discovering lots of bugs, I'd like to get trac access to file them there. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 15:52:46 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:52:46 +0200 Subject: [Vtigercrm-developers] [BUG] cannot change my company name Message-ID: <20070508195245.GE17322@nibiru.local> Hi folks, I cannot change my company name. No matter what I do, it remains "vtiger". How can I get this fixed ASAP ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 16:25:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 22:25:20 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! Message-ID: <20070508202520.GF17322@nibiru.local> This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gharris at teamexpansion.org Tue May 8 16:41:06 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 16:41:06 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> Message-ID: Who in the world are you and why are you cursing all over the place!!!! Thanks, Greg Harris ---------- Original Message ---------- FROM: Enrico Weigelt TO: vtiger support DATE: Tue, 8 May 2007 22:25:20 +0200 SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From jorge.torres.maldonado at gmail.com Tue May 8 16:49:54 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 8 May 2007 16:49:54 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: References: <20070508202520.GF17322@nibiru.local> Message-ID: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Hi, I believe BUG reporting is very important, no matter who in planet one may be. Cheers, On 5/8/07, Greg Harris wrote: > > Who in the world are you and why are you cursing all over the place!!!! > > Thanks, > > Greg Harris > > > > ---------- Original Message ---------- > > FROM: Enrico Weigelt > TO: vtiger support > DATE: Tue, 8 May 2007 22:25:20 +0200 > > SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! > > > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/d8b9195b/attachment-0002.html From gharris at teamexpansion.org Tue May 8 17:13:00 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 17:13:00 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/a8cdeb4d/attachment-0004.html From tzenk at gmx.net Tue May 8 18:40:10 2007 From: tzenk at gmx.net (Torsten Zenk) Date: Wed, 09 May 2007 00:40:10 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> References: <20070508202520.GF17322@nibiru.local> Message-ID: <4640FC4A.1050703@gmx.net> Yeah, Bug reporting in a neutral way is very important, but we don?t need any personal emotions in a bug report, so wether it is ...what the hell....or it is.....who are you...just report and keep your emotions for the forum and your wife ;) Torsten Enrico Weigelt schrieb: > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > From gopals at vtiger.com Tue May 8 22:20:11 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 09 May 2007 07:50:11 +0530 Subject: [Vtigercrm-developers] Requesting trac access In-Reply-To: <20070508194803.GD17322@nibiru.local> References: <20070508194803.GD17322@nibiru.local> Message-ID: <46412FDB.9080001@vtiger.com> Hi, I've enabled trac access for you. Shortly you will receive login details in a separate mail. URL: http://vtiger.fosslabs.com Regards, Gopal Enrico Weigelt wrote: > Hi folks, > > as I'm currenly discovering lots of bugs, I'd like to get trac > access to file them there. > > cu > From weigelt at metux.de Wed May 9 07:27:30 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:27:30 +0200 Subject: [Vtigercrm-developers] RFC: add function getCurrentOrgDetails() Message-ID: <20070509112730.GA16156@nibiru.local> Hi folks, there are several points where the information of the current organisation is retrieved on pedestrian ways (several SQL queries, object creations, etc). Such things are an good place for bugs, so we should reduce them as much as possible. So I suggest introducing an new function "getEntityOrgDetails()", which retrieves that information by the given $crmid. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:28:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:28:41 +0200 Subject: [Vtigercrm-developers] TeX printing Message-ID: <20070509112841.GB16156@nibiru.local> Hi folks, is anyone working on TeX based printing (ie. Invoices) ? Otherwise I'll take care of it. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:42:40 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:42:40 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org Message-ID: <20070509114240.GC16156@nibiru.local> Hi folks, could anyone please explain what the table vtiger_entity2org actually is for ? As far as I understood it, we map the entities (ie. users are entities ?) to the organisation. Now I wonder if an entity can be associated to more than one organisation. If not, it's trivial to move that information directly to the entity's record and skip (maybe drop) this table. BTW: AFAIK we use the org's *NAME* here, not the (numerical) ID or some unique ident. That's a really bad idea, ie. makes changing the org name very, very complicated. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 08:06:21 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:06:21 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509112841.GB16156@nibiru.local> References: <20070509112841.GB16156@nibiru.local> Message-ID: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> I was thinking more about a wiki style On 5/9/07, Enrico Weigelt wrote: > > > Hi folks, > > > is anyone working on TeX based printing (ie. Invoices) ? > Otherwise I'll take care of it. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/18ddd9ce/attachment-0004.html From weigelt at metux.de Wed May 9 08:12:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 14:12:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> Message-ID: <20070509121210.GA28731@nibiru.local> * Jorge Torres schrieb: > I was thinking more about a wiki style How can it assist in rendering high quality preprints ? Is there any good rendering engine for this out there we can use ? The wiki syntax is good for easy editing of hypertext, but driving an print from db content is an completely different issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 08:49:32 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:49:32 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509121210.GA28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> Message-ID: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Enrico, You are right, latex is about high quality prints, still you have to make a document class for what you want and so on, and I dont know a way about extracting db content from latex, I thought that (extracting db contents) could be easier achieved in a wiki syntax way, and precisely because of wiki's "easy-fast editing" it would be perfect for end user applications. Also wiki to xml shouldn't be that complicated, having data in XML; a XSL template can be very simple to describe (much more easier than latex class), there are xsl "rendering" functions for php; the result of xsl(xml) could be html, so you can either send it to the web browser or you can "html to pdf" which is straight forward in php. What do you think? On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > I was thinking more about a wiki style > > How can it assist in rendering high quality preprints ? > Is there any good rendering engine for this out there we can use ? > > The wiki syntax is good for easy editing of hypertext, but driving > an print from db content is an completely different issue. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/85d38641/attachment-0002.html From jorge.torres.maldonado at gmail.com Wed May 9 09:00:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:00:24 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Message-ID: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Enrico, Wait, Now that I think about it, it would be easier to just have vtiger to outputs a printing configuration form in which one textarea has an xml data structure of information that wants to be printed (say "invoice"), then another textarea for your xsl. If so; the only thing one should do, is to describe a xsl template for that xml structure, save, and that's it, next time you want to print, what vtiger would do is to "render" that information, as explained in my last email. Cheers, Jorge On 5/9/07, Jorge Torres wrote: > > Enrico, > > You are right, latex is about high quality prints, still you have to make > a document class for what you want and so on, and I dont know a way about > extracting db content from latex, I thought that (extracting db contents) > could be easier achieved in a wiki syntax way, and precisely because of > wiki's "easy-fast editing" it would be perfect for end user applications. > Also wiki to xml shouldn't be that complicated, having data in XML; a XSL > template can be very simple to describe (much more easier than latex class), > there are xsl "rendering" functions for php; the result of xsl(xml) could be > html, so you can either send it to the web browser or you can "html to pdf" > which is straight forward in php. > > What do you think? > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > I was thinking more about a wiki style > > > > How can it assist in rendering high quality preprints ? > > Is there any good rendering engine for this out there we can use ? > > > > The wiki syntax is good for easy editing of hypertext, but driving > > an print from db content is an completely different issue. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/d40f8d56/attachment-0004.html From weigelt at metux.de Wed May 9 09:35:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:35:44 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <20070509133544.GC28731@nibiru.local> * Jorge Torres schrieb: Hi, > Wait, Now that I think about it, it would be easier to just > have vtiger to outputs a printing configuration form in which > one textarea has an xml data structure of information that > wants to be printed (say "invoice"), then another textarea > for your xsl. If so; the only thing one should do, is to > describe a xsl template for that xml structure, save, and > that's it, next time you want to print, what vtiger would > do is to "render" that information, as explained in my last email. Again, very complicated for user and coder. Why not just an option in the settings screen, where the user can select renderer and template, and maybe an additional template editing form ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 09:39:42 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 15:39:42 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509114240.GC16156@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 01:42:40PM +0200 References: <20070509114240.GC16156@nibiru.local> Message-ID: <20070509153942.B3824@Strawberry.COM> Hi, it can be assigned to more than one organization. There is a 'primary' column in the entity2org table which defines the primary organization - the one that really 'owns' the entity. Jens On Wed, May 09, 2007 at 01:42:40PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > could anyone please explain what the table vtiger_entity2org > actually is for ? > > As far as I understood it, we map the entities (ie. users are > entities ?) to the organisation. > > Now I wonder if an entity can be associated to more than one > organisation. If not, it's trivial to move that information > directly to the entity's record and skip (maybe drop) this table. > > > BTW: AFAIK we use the org's *NAME* here, not the (numerical) > ID or some unique ident. That's a really bad idea, ie. makes > changing the org name very, very complicated. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 09:44:00 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 15:44:00 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <4641D020.60605@tsolucio.com> Hi, Why not use the merge system that is already in vtiger? I have enhanced the merge system based on forum code and I have added merge to SO very easily. Now my client can create word, openoffice or RTF documents using their favorite document processor as if they made any other template. What advantage is there in TeX? Joe TSolucio Jorge Torres escribi?: > Enrico, From weigelt at metux.de Wed May 9 09:45:37 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:45:37 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509153942.B3824@Strawberry.COM> References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> Message-ID: <20070509134537.GD28731@nibiru.local> * Jens Hamisch schrieb: Hi, > it can be assigned to more than one organization. > There is a 'primary' column in the entity2org table which defines the > primary organization - the one that really 'owns' the entity. hmm, meanwhile I've found some pieces of code (in the invoice module) which explicitly break if the we have more than one org per entity (AFAIK). So what's correct now ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 09:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:47:48 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <20070509134748.GE28731@nibiru.local> * Joe Bordes schrieb: Hi, > Why not use the merge system that is already in vtiger? Well, actually, I never heared about that. > What advantage is there in TeX? High quality preprints ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 09:49:45 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:49:45 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Sounds great, but i dont get how is it that you get DB info from client's, word, openoffice. Thanks, Jorge On 5/9/07, Joe Bordes wrote: > > Hi, > > Why not use the merge system that is already in vtiger? > I have enhanced the merge system based on forum code and I have added > merge to SO very easily. Now my client can create word, openoffice or > RTF documents using their favorite document processor as if they made > any other template. > What advantage is there in TeX? > > Joe > TSolucio > > Jorge Torres escribi?: > > Enrico, > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/850e0d7c/attachment-0002.html From jens at Strawberry.COM Wed May 9 10:00:11 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 16:00:11 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509134537.GD28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 03:45:37PM +0200 References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> <20070509134537.GD28731@nibiru.local> Message-ID: <20070509160011.E3824@Strawberry.COM> Hi, do you have some more detailed information on that? Could be either a bug or something missed in the port of my changes to 5.0.3. Jens On Wed, May 09, 2007 at 03:45:37PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > it can be assigned to more than one organization. > > There is a 'primary' column in the entity2org table which defines the > > primary organization - the one that really 'owns' the entity. > > hmm, meanwhile I've found some pieces of code (in the invoice module) > which explicitly break if the we have more than one org per > entity (AFAIK). > > So what's correct now ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 10:02:21 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:02:21 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Message-ID: <20070509140221.GF28731@nibiru.local> * Jorge Torres schrieb: Hi, > Sounds great, but i dont get how is it that you get DB info > from client's, word, openoffice. Are we still talking about the same thing ? I'm working on invoice pdf rendering, which is entirely done on the server. Other formats, ie. OO could be generated the same way. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 10:16:48 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 10:16:48 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Enrico, Yes, from I want it to do it from server side. It seems that I don't get what this merge system does, I understood from Jen's suggestion: that users could work their templates at client side, is this correct?, if so, how would they get DB data or data content structure from clients editor. Rendering setup Option in settings screen as Enrico mentioned would be perfect. On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > Sounds great, but i dont get how is it that you get DB info > > from client's, word, openoffice. > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/c1f5479b/attachment-0003.html From weigelt at metux.de Wed May 9 10:23:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:23:28 +0200 Subject: [Vtigercrm-developers] organization ident Message-ID: <20070509142328.GH28731@nibiru.local> Hi folks, I've found an big-fat problem with the organization modeling in the DB: The org is always referenced by its name ! To be clear: its the *printable* name, which appears for example on the bill. So now it's clear, why it cannot be changed in the settings ;-O It appears the name is also abused as ident, which is the key problem. There's no additional ID here. To fix this, we have two options: a) Add an numerical ID to the organization table and fix all the schema to reference on that. This would probably be the most clean model, but requires much care on schema updates. b) Add an new text field (ie. "official_name") which now carries the actual *name* (ie. for printing on the invoice) and leave evrything else untouched. Nearly trivial to implement, but maybe not very clean design. Comments ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 10:33:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:33:35 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Message-ID: <20070509143335.GI28731@nibiru.local> * Jorge Torres schrieb: > if so, how would they get DB data or data content structure > from clients editor. Simply add some new button which calls the invoice rendering with an different engine / output format ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 10:59:10 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 16:59:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <4641E1BE.80207@tsolucio.com> Yes, we are still talking about the same thing. Please take a look at the existng merge system for accounts. The idea is that you open up OO and write the template, where you want the contact name (for example) you put CONTACT_NAME and this gets substituted dynamically when you choose the template and the contact. If we add this feature to invoice, you could write your invoice in word and use INVOICE_NUMBER or INVOICE_DATE for example. That is basically what I have working. Joe TSolucio Enrico Weigelt escribi?: > * Jorge Torres schrieb: > > Hi, > > >> Sounds great, but i dont get how is it that you get DB info >> from client's, word, openoffice. >> > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > From weigelt at metux.de Wed May 9 11:12:19 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:12:19 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641E1BE.80207@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> Message-ID: <20070509151219.GJ28731@nibiru.local> * Joe Bordes schrieb: Hi, > Please take a look at the existng merge system for accounts. Where is it ? > The idea is that you open up OO and write the template, where you want > the contact name (for example) you put CONTACT_NAME and this gets > substituted dynamically when you choose the template and the contact. > If we add this feature to invoice, you could write your invoice in word > and use INVOICE_NUMBER or INVOICE_DATE for example. Actually, I'm not interested in having to cope with blobs like OO, neither do I have anything to do w/ M$ crap. That's totally irrelevant to me. All I want is that the already existing pdf generation stuff produces an high quality pdf preprint for my bills - w/o requiring any manual intervention. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 11:15:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 17:15:35 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509142328.GH28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 04:23:28PM +0200 References: <20070509142328.GH28731@nibiru.local> Message-ID: <20070509171535.F3824@Strawberry.COM> Hi, or opportunity c) handle organization and orgunit as yet another CRMEntities would be the best fit into the internal vtiger design for my point of view. The effort would be even more than just introducing an orgid (code-changes and cleanups), but from the maintainability point of view it would be a clear and straight forward solution. Jens On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I've found an big-fat problem with the organization modeling in > the DB: > > The org is always referenced by its name ! > To be clear: its the *printable* name, which appears for example > on the bill. > > So now it's clear, why it cannot be changed in the settings ;-O > > It appears the name is also abused as ident, which is the key > problem. There's no additional ID here. > > To fix this, we have two options: > > a) Add an numerical ID to the organization table and fix all the > schema to reference on that. This would probably be the most > clean model, but requires much care on schema updates. > > b) Add an new text field (ie. "official_name") which now carries > the actual *name* (ie. for printing on the invoice) and leave > evrything else untouched. Nearly trivial to implement, but maybe > not very clean design. > > > > Comments ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 11:26:50 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:26:50 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <4641E83A.2030603@tsolucio.com> Very good idea!! Joe TSolucio Jens Hamisch escribi?: > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities > > > would be the best fit into the internal vtiger design for my > point of view. > > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. > > > Jens > > > > On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > >> Hi folks, >> >> >> I've found an big-fat problem with the organization modeling in >> the DB: >> >> The org is always referenced by its name ! >> To be clear: its the *printable* name, which appears for example >> on the bill. >> >> So now it's clear, why it cannot be changed in the settings ;-O >> >> It appears the name is also abused as ident, which is the key >> problem. There's no additional ID here. >> >> To fix this, we have two options: >> >> a) Add an numerical ID to the organization table and fix all the >> schema to reference on that. This would probably be the most >> clean model, but requires much care on schema updates. >> >> b) Add an new text field (ie. "official_name") which now carries >> the actual *name* (ie. for printing on the invoice) and leave >> evrything else untouched. Nearly trivial to implement, but maybe >> not very clean design. >> >> >> >> Comments ? >> >> cu >> -- >> --------------------------------------------------------------------- >> Enrico Weigelt == metux IT service >> >> phone: +49 36207 519931 www: http://www.metux.de/ >> fax: +49 36207 519932 email: contact at metux.de >> cellphone: +49 174 7066481 >> --------------------------------------------------------------------- >> -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- >> --------------------------------------------------------------------- >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > From jorge.torres.maldonado at gmail.com Wed May 9 11:28:10 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 11:28:10 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509151219.GJ28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> Message-ID: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Hi, I don't see why having other formats output support would be a problem, Jen's idea of having templates done in OO or others, is great; simply make your template on whatever editor you prefer, M$, OO, vi. upload and next time you generate invoices, buy orders, or as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, but I certainly want to see Jens work, where can I get it? Thanks, Jorge On 5/9/07, Enrico Weigelt wrote: > > * Joe Bordes schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the contact. > > If we add this feature to invoice, you could write your invoice in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/8a056c99/attachment-0003.html From weigelt at metux.de Wed May 9 11:27:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:27:49 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <20070509152749.GK28731@nibiru.local> * Jens Hamisch schrieb: > > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities What does that exactly mean ? Schema change necessary for that ? > would be the best fit into the internal vtiger design for my > point of view. ACK. > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. ACK. So: what has to be done for that ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 11:39:01 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:39:01 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <4641EB15.70205@tsolucio.com> http://forums.vtiger.com/viewtopic.php?t=14501 Jorge Torres escribi?: > Hi, > > I don't see why having other formats output support would be a > problem, Jen's idea of having templates done in OO or others, is > great; simply make your template on whatever editor you prefer, M$, > OO, vi. upload and next time you generate invoices, buy orders, or > as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont > know if those are Jen's plans, but I certainly want to see Jens > work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, *Enrico Weigelt* > wrote: > > * Joe Bordes > schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where > you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the > contact. > > If we add this feature to invoice, you could write your invoice > in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From jens at Strawberry.COM Wed May 9 12:02:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:02:37 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com>; from Jorge Torres on Wed, May 09, 2007 at 11:28:10AM -0400 References: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <20070509180237.G3824@Strawberry.COM> Hi, I'd prefer a solution that is more generic. The thing I'm not happy about is to introduce another dependency into vtiger. However if it becomes necessary, than I'd suggest to focus on more actual products than latex. OpenOffice and StarOffice both support the open document standard. I don't know if M$ will support it some day, too, but the office suites mentioned above both run on all operation systems. Finally those who just want to read and print an invoice may do not have to install the entire office suite. They may use the document viewers available. There's another thing I'm missing in vtiger: document management. vtiger's slogan is to reflect an entire customer life cycle. Today we have campains, quotes, sales-order and invoices. There are open issues like contracts and statements that are missing. But this is just a more or less 'technical' point of view. What about all the letters written to (and received from) a customer. This is also part of the life-cycle and therefor should be managed by vtiger. Thus: what we need is an interface to the office suites. And the logical consequence would be: All documents produced by vtiger should be based on the same standard as the documents managed by vtiger. Than it would be easy to manage self-produced documents as any other documents, too. My conclusion: Use the open document standard instead of latex. Jens On Wed, May 09, 2007 at 11:28:10AM -0400, Jorge Torres wrote: > Hi, > > I don't see why having other formats output support would be a problem, > Jen's idea of having templates done in OO or others, is great; simply make > your template on whatever editor you prefer, M$, OO, vi. upload and next > time you generate invoices, buy orders, or as the case might be, you > have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, > but I certainly want to see Jens work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Joe Bordes schrieb: > > > > Hi, > > > > > Please take a look at the existng merge system for accounts. > > > > Where is it ? > > > > > The idea is that you open up OO and write the template, where you want > > > the contact name (for example) you put CONTACT_NAME and this gets > > > substituted dynamically when you choose the template and the contact. > > > If we add this feature to invoice, you could write your invoice in word > > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > > > Actually, I'm not interested in having to cope with blobs like OO, > > neither do I have anything to do w/ M$ crap. That's totally > > irrelevant to me. > > > > All I want is that the already existing pdf generation stuff > > produces an high quality pdf preprint for my bills - w/o requiring > > any manual intervention. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 9 12:06:40 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:06:40 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509152749.GK28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 05:27:49PM +0200 References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> <20070509152749.GK28731@nibiru.local> Message-ID: <20070509180640.H3824@Strawberry.COM> Hi, regarding the schema: just introduce an organization ID and add a constraint to the CRMEntity table. (IMHO orgunit already has an orgunitid - w/o looking at the code). code changes are more complex: Mainly the Save methods have to be reviewed whether they may be reduced to the super class methods. Jens On Wed, May 09, 2007 at 05:27:49PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > > > Hi, > > > > > > or opportunity > > > > c) handle organization and orgunit as yet another CRMEntities > > What does that exactly mean ? > Schema change necessary for that ? > > > would be the best fit into the internal vtiger design for my > > point of view. > > ACK. > > > The effort would be even more than just introducing an orgid > > (code-changes and cleanups), but from the maintainability point > > of view it would be a clear and straight forward solution. > > ACK. > > So: what has to be done for that ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 14:57:58 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 20:57:58 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509180237.G3824@Strawberry.COM> References: <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> Message-ID: <20070509185758.GM28731@nibiru.local> * Jens Hamisch schrieb: Hi, > I'd prefer a solution that is more generic. well, my approach is quite generic ;-p > The thing I'm not happy about is to introduce another > dependency into vtiger. Fearing dependencies is what makes projects really fat and unmaintainable. Mozilla is an good (bad) example for that ;P BTW: you don't need to have (la)tex. You can use some other renderer (ie. fpdf-based, plain html, ...) > However if it becomes necessary, than I'd suggest to focus > on more actual products than latex. Yes, Latex is quite old, but it's also quite, quite stable. Coding activity is no appropriate indicator on quality. > OpenOffice and StarOffice both support the open document standard. Nice. Do you expect me to have that blod installed+running just to get an pdf bill ? > I don't know if M$ will support it some day, too, but the office > suites mentioned above both run on all operation systems. Finally > those who just want to read and print an invoice may do not have > to install the entire office suite. They may use the document > viewers available. I do *not* want any bit in some $office_format. I just want to have my bills as pdf w/ *my* custom layout. Latex is an very proven approach. > There's another thing I'm missing in vtiger: document management. Ugh, that's another story ... > And the logical consequence would be: All documents produced by > vtiger should be based on the same standard as the documents managed > by vtiger. Than it would be easy to manage self-produced documents > as any other documents, too. Interface != Storage/Encoding/Format. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From javawaba at hotmail.com Wed May 9 20:14:27 2007 From: javawaba at hotmail.com (Jim Weir) Date: Wed, 09 May 2007 20:14:27 -0400 Subject: [Vtigercrm-developers] ?? Message-ID: how do I unsubscribe from this list? _________________________________________________________________ Catch suspicious messages before you open them?with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 From brett.hooker at roarz.com Wed May 9 23:24:05 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 10 May 2007 13:24:05 +1000 Subject: [Vtigercrm-developers] VT5 Outlook Plugin Development Questions Message-ID: <46429055.4080208@roarz.com> Team, Which version of VB is used to develop/maintain the VT5 Outlook Plugin? Is there wiki/starter on contributing to the VT5 Outlook Plugin? Thanks, Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/4d8fcdbc/attachment-0003.html From gopals at vtiger.com Thu May 10 00:48:25 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 10 May 2007 10:18:25 +0530 Subject: [Vtigercrm-developers] ?? In-Reply-To: References: Message-ID: <4642A419.3010003@vtiger.com> Hi, You can unsubscribe from the developer list at: http://lists.vtigercrm.com/mailman/listinfo/vtigercrm-developers Thanks, Gopal Jim Weir wrote: > how do I unsubscribe from this list? > > _________________________________________________________________ > Catch suspicious messages before you open them---with Windows Live > Hotmail. > http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/598fe713/attachment-0003.html From jens at Strawberry.COM Thu May 10 03:37:41 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 10 May 2007 09:37:41 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509185758.GM28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 08:57:58PM +0200 References: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> <20070509185758.GM28731@nibiru.local> Message-ID: <20070510093741.B7494@Strawberry.COM> Hi, > I do *not* want any bit in some $office_format. I just want to > have my bills as pdf w/ *my* custom layout. Latex is an very > proven approach. let's get back to the generic solution: (la)tex is not standard on Unix platforms, but (g|t|n)roff and tbl is! Those provide enough features to produce high quality formulars. And they do not intro- duce another prerequisite. I havn't had a look at what finally came into the 5.0.3 branch. But I already introduced different pdf templates for all organizations and orgunits ... > > There's another thing I'm missing in vtiger: document management. > > Ugh, that's another story ... > > > And the logical consequence would be: All documents produced by > > vtiger should be based on the same standard as the documents managed > > by vtiger. Than it would be easy to manage self-produced documents > > as any other documents, too. > > Interface != Storage/Encoding/Format. Agree. A document management should be capable of handling any format of a document, so Office docs, scans and also latex would not contradict to the document management approach. However, to get more things covered office would be the first choice, because to create letters out of a vtiger attached document management, we need an interface to the office suite (which of course could be simply the creation of a base document that becomes opened). Having this interface, we have evverything at hand to simply create any formular w/o interfacing to yet another monstrum of third party software (which latex definitely is!). Also the latex approach is even more complex, because the templates themselfes prerequisite according latex extensions to be installed (at least may!). In comparison the office suites are monolithic and therefor complete. And finally: latex was and will be forever a system used by some experts. It is not addressed to people thout programming skills. I'm afraid it will not be possible to hand over the template definition to one of your sales and marketing people if it is based on latex. Office keeps this door open ... Jens -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From kenlyle at yahoo.com Thu May 10 10:12:38 2007 From: kenlyle at yahoo.com (Ken Lyle) Date: Thu, 10 May 2007 07:12:38 -0700 (PDT) Subject: [Vtigercrm-developers] Document Management In-Reply-To: Message-ID: <448400.55472.qm@web36405.mail.mud.yahoo.com> I have attended a few webinars from Alfresco, and they seem to have a good open source document management and web content management system. I have the impression that they are very standards compliant, like WebDAV, and something that makes their repository show up as a shared drive, and have some cool toys like rules that do automatic format conversions, say of each .doc to a PDF for the archive version. It seems like it should be only a 'loose dependency', which might make everyone happy. And, for the merging itself, maybe can use GoogleApps, or ThinkFree, or one of the free web suites that will save to .doc, .pdf, etc. That seems like a dependency that actually liberates the developers, the users, and their IT staffs from deploying software. Maybe you wizards can run with one of these ideas... Ken Think bigger than 'left' vs. 'right'- basic freedoms are under attack- http://www.healthfreedomusa.org/index.php/?cat=2 From weigelt at metux.de Thu May 10 11:19:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:19:20 +0200 Subject: [Vtigercrm-developers] [PATCH] 5.1_jens vs. jens' private Message-ID: <20070510151920.GA25395@nibiru.local> Hi folks, here's a bunch of patches between the 5.1_jens branch and jens's private tree, cleaned up a little bit. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/database/Postgres8.php htdocs/include/database/Postgres8.php --- orig/include/database/Postgres8.php 2007-05-04 16:11:49.000000000 +0200 +++ htdocs/include/database/Postgres8.php 2007-05-07 14:23:49.000000000 +0200 @@ -1,144 +1,144 @@ -info( "fixPostgresQuery: ".$query); - - // If we already have an order or group cluase separate ist for later use - if( strpos($queryRecord,'GROUP') > 0) - { - $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); - if( strpos($groupClause,'ORDER') > 0) - { - $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); - $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); - } - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); - } - - if( strpos($queryRecord,'ORDER') > 0) - { - $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); - } - - // Construkt the privateGroupList from the filed list by separating combined - // record.field entries - $privateGroupList = array(); - $token = strtok( $queryFields, ", () "); - while( $token !== false) { - if( strpos( $token, ".") !== false) { - array_push( $privateGroupList, $token); - } - $token = strtok( ", () "); - } - sort( $privateGroupList); - $groupFields = ""; - $last = ""; - for( $i = 0; $i < count($privateGroupList); $i++) { - if( $last != $privateGroupList[$i]) { - if( $groupFields == "") - $groupFields = $privateGroupList[$i]; - else - $groupFields .= ",".$privateGroupList[$i]; - } - $last = $privateGroupList[$i]; - } - - // Rebuild the query - $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; - if( $groupClause != "" ) - $groupClause = $groupClause.",".$groupFields; - else - $groupClause = $groupFields; - $query .= expandStar($groupClause,$log)." ".$orderClause; - - if( $debug) - $log->info( "fixPostgresQuery result: ".$query); - - return( $query); -} - -// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause -function expandStar($fieldlist,$log) -{ - $expanded=""; - $field = strtok( $fieldlist, ","); - while( $field != "") - { - //remove leading and trailing spaces - $field = trim( $field); - - //still spaces in the field indicate a complex structure - if( strpos( $field, " ") == 0) - { - - //locate table- and fieldname - $pos = strpos( $field, "."); - if( $pos > 0) - { - $table = substr( $field, 0, $pos); - $subfield = substr( $field, $pos+1, strlen($field)-$pos); - - //do we need to expand? - if( $subfield == "*") - $field = expandRecord($table,$log); - } - - //add the propably expanded field to the querylist - if( $expanded == "") - $expanded = $field; - else - $expanded .= ",".$field; - } - - //next field - $field = strtok(","); - } - - //return the expanded fieldlist - return( $expanded); -} - -//return an expanded table field list -function expandRecord($table,$log) -{ +info( "fixPostgresQuery: ".$query); + + // If we already have an order or group cluase separate ist for later use + if( strpos($queryRecord,'GROUP') > 0) + { + $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); + if( strpos($groupClause,'ORDER') > 0) + { + $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); + $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); + } + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); + } + + if( strpos($queryRecord,'ORDER') > 0) + { + $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); + } + + // Construkt the privateGroupList from the filed list by separating combined + // record.field entries + $privateGroupList = array(); + $token = strtok( $queryFields, ", () "); + while( $token !== false) { + if( strpos( $token, ".") !== false) { + array_push( $privateGroupList, $token); + } + $token = strtok( ", () "); + } + sort( $privateGroupList); + $groupFields = ""; + $last = ""; + for( $i = 0; $i < count($privateGroupList); $i++) { + if( $last != $privateGroupList[$i]) { + if( $groupFields == "") + $groupFields = $privateGroupList[$i]; + else + $groupFields .= ",".$privateGroupList[$i]; + } + $last = $privateGroupList[$i]; + } + + // Rebuild the query + $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; + if( $groupClause != "" ) + $groupClause = $groupClause.",".$groupFields; + else + $groupClause = $groupFields; + $query .= expandStar($groupClause,$log)." ".$orderClause; + + if( $debug) + $log->info( "fixPostgresQuery result: ".$query); + + return( $query); +} + +// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause +function expandStar($fieldlist,$log) +{ + $expanded=""; + $field = strtok( $fieldlist, ","); + while( $field != "") + { + //remove leading and trailing spaces + $field = trim( $field); + + //still spaces in the field indicate a complex structure + if( strpos( $field, " ") == 0) + { + + //locate table- and fieldname + $pos = strpos( $field, "."); + if( $pos > 0) + { + $table = substr( $field, 0, $pos); + $subfield = substr( $field, $pos+1, strlen($field)-$pos); + + //do we need to expand? + if( $subfield == "*") + $field = expandRecord($table,$log); + } + + //add the propably expanded field to the querylist + if( $expanded == "") + $expanded = $field; + else + $expanded .= ",".$field; + } + + //next field + $field = strtok(","); + } + + //return the expanded fieldlist + return( $expanded); +} + +//return an expanded table field list +function expandRecord($table,$log) +{ global $adb; $result = ""; $subfields = $adb->getColumnNames($table); - - //construct an entity string - for( $i=0; $i 0) - $result = substr( $result, 0, strlen( $result) -1); - - //return out new string - return( $result); -} -?> + + //construct an entity string + for( $i=0; $i 0) + $result = substr( $result, 0, strlen( $result) -1); + + //return out new string + return( $result); +} +?> -------------- next part -------------- diff -ruN orig/data/SugarBean.php htdocs/data/SugarBean.php --- orig/data/SugarBean.php 2007-05-04 16:11:47.000000000 +0200 +++ htdocs/data/SugarBean.php 2007-05-07 14:40:44.000000000 +0200 @@ -1,451 +1,451 @@ -id) || $this->id == "") - { - $isUpdate = false; - } - - if ( $this->new_with_id == true ) - { - $isUpdate = false; - } - - //$this->date_modified = $this->db->formatDate(date('YmdHis')); - $this->date_modified = date('YmdHis'); - if (isset($current_user)) $this->modified_user_id = $current_user->id; - - if($isUpdate) - { - $query = "Update ".$this->table_name." set "; - } - else - { - //$this->date_entered = $this->db->formatDate(date('YmdHis')); - $this->date_entered = date('YmdHis'); - - if($this->new_schema && - $this->new_with_id == false) - { - $this->id = $this->db->getUniqueID("vtiger_users"); - } - - $query = "INSERT into ".$this->table_name; - } - // todo - add date modified to the list. - - // write out the SQL statement. - //$query .= $this->table_name." set "; - - $firstPass = 0; - $insKeys = '('; - $insValues = '('; - $updKeyValues=''; - foreach($this->column_fields as $field) - { - // Do not write out the id vtiger_field on the update statement. - // We are not allowed to change ids. - if($isUpdate && ('id' == $field)) - continue; - - // Only assign variables that have been set. - if(isset($this->$field)) - { - // Try comparing this element with the head element. - if(0 == $firstPass) - { - $firstPass = 1; - } - else - { - if($isUpdate) - { - $updKeyValues = $updKeyValues.", "; - } - else - { - $insKeys = $insKeys.", "; - $insValues = $insValues.", "; - } - } - /*else - $query = $query.", "; - - $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; - */ - if($isUpdate) - { - $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - else - { - $insKeys = $insKeys.$field; - $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - } - } - - if($isUpdate) - { - $query = $query.$updKeyValues." WHERE ID = '$this->id'"; - $this->log->info("Update $this->object_name: ".$query); - } - else - { - $query = $query.$insKeys.") VALUES ".$insValues.")"; - $this->log->info("Insert: ".$query); - } - - $this->db->query($query, true); - - // If this is not an update then store the id for later. - if(!$isUpdate && !$this->new_schema && !$this->new_with_id) - { - $this->db->println("Illegal Access - SugarBean"); - //this is mysql specific - $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); - } - - return $this->id; - } - - - /** - * This function retrieves a record of the appropriate type from the DB. - * It fills in all of the vtiger_fields from the DB into the object it was called on. - * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. - * returns this - The object that it was called apon or null if exactly 1 record was not found. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - function retrieve($id = -1, $encodeThis=true) { - if ($id == -1) { - $id = $this->id; - } - if($id == '') { - return null; - } -// GS porting vtiger_crmentity -$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; -// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; - $this->log->debug("Retrieve $this->object_name: ".$query); - - $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); - - if(empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result, -1, $encodeThis); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - */ - - function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { - $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); - - $query = $this->create_list_query($order_by, $where); - - return $this->process_list_query($query, $row_offset, $limit, $max); - } - - /** - * This function returns a full (ie non-paged) list of the current object type. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function get_full_list($order_by = "", $where = "") { - $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - $result =& $this->db->query($query, false); - - if($this->db->getRowCount($result) > 0){ - - // We have some data. - while ($row = $this->db->fetchByAssoc($result)) { - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else { - $this->$field = ''; - } - } - - - $list[] = clone($this); //added clone tosupport PHP5 - } - } - - if (isset($list)) return $list; - else return null; - - } - - function create_list_query($order_by, $where) - { - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - return $query; - } - - - function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) - { - global $list_max_entries_per_page; - $this->log->debug("process_list_query: ".$query); - if(!empty($limit) && $limit != -1){ - $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); - }else{ - $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); - } - - $list = Array(); - if($max_per_page == -1){ - $max_per_page = $list_max_entries_per_page; - } - $rows_found = $this->db->getRowCount($result); - - $this->log->debug("Found $rows_found ".$this->object_name."s"); - - $previous_offset = $row_offset - $max_per_page; - $next_offset = $row_offset + $max_per_page; - - if($rows_found != 0) - { - - // We have some data. - - for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - - $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else - { - $this->$field = ""; - } - } - - - $list[] = clone($this); //added clone to support PHP5 - } - } - - $response = Array(); - $response['list'] = $list; - $response['row_count'] = $rows_found; - $response['next_offset'] = $next_offset; - $response['previous_offset'] = $previous_offset; - - return $response; - } - - - /** - * Track the viewing of a detail record. This leverages get_summary_text() which is object specific - * params $user_id - The user that is viewing the record. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function track_view($user_id, $current_module,$id='') - { - $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); - - $tracker = new Tracker(); - $tracker->track_view($user_id, $current_module, $id, ''); - } - - - /** This function should be overridden in each module. It marks an item as deleted. - * If it is not overridden, then marking this type of item is not allowed - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function mark_deleted($id) - { - $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; - $this->db->query($query, true,"Error marking record deleted: "); - - $this->mark_relationships_deleted($id); - - // Take the item off of the recently viewed lists. - $tracker = new Tracker(); - $tracker->delete_item_history($id); - - } - - - /* This is to allow subclasses to fill in row specific columns of a list view form - function list_view_parse_additional_sections(&$list_form) - { - } - */ - /* This function assigns all of the values into the template for the list view - function get_list_view_array(){ - $return_array = Array(); - - foreach($this->list_fields as $field) - { - $return_array[strtoupper($field)] = $this->$field; - } - - return $return_array; - } - function get_list_view_data() - { - - return $this->get_list_view_array(); - } - - function get_where(&$fields_array) - { - $where_clause = "WHERE "; - $first = 1; - foreach ($fields_array as $name=>$value) - { - if ($first) - { - $first = 0; - } - else - { - $where_clause .= " AND "; - } - - $where_clause .= "$name = ".$adb->quote($value).""; - } - - $where_clause .= " AND deleted=0"; - return $where_clause; - } - - - function retrieve_by_string_fields($fields_array, $encode=true) - { - $where_clause = $this->get_where($fields_array); - - $query = "SELECT * FROM $this->table_name $where_clause"; - $this->log->debug("Retrieve $this->object_name: ".$query); - $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); - if( empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result,-1, $encode); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - - // this method is called during an import before inserting a bean - // define an associative array called $special_fields - // the keys are user defined, and don't directly map to the bean's vtiger_fields - // the value is the method name within that bean that will do extra - // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' - - function process_special_fields() - { - foreach ($this->special_functions as $func_name) - { - if ( method_exists($this,$func_name) ) - { - $this->$func_name(); - } - } - } - - */ -} - - -?> +id) || $this->id == "") + { + $isUpdate = false; + } + + if ( $this->new_with_id == true ) + { + $isUpdate = false; + } + + //$this->date_modified = $this->db->formatDate(date('YmdHis')); + $this->date_modified = date('YmdHis'); + if (isset($current_user)) $this->modified_user_id = $current_user->id; + + if($isUpdate) + { + $query = "Update ".$this->table_name." set "; + } + else + { + //$this->date_entered = $this->db->formatDate(date('YmdHis')); + $this->date_entered = date('YmdHis'); + + if($this->new_schema && + $this->new_with_id == false) + { + $this->id = $this->db->getUniqueID("vtiger_users"); + } + + $query = "INSERT into ".$this->table_name; + } + // todo - add date modified to the list. + + // write out the SQL statement. + //$query .= $this->table_name." set "; + + $firstPass = 0; + $insKeys = '('; + $insValues = '('; + $updKeyValues=''; + foreach($this->column_fields as $field) + { + // Do not write out the id vtiger_field on the update statement. + // We are not allowed to change ids. + if($isUpdate && ('id' == $field)) + continue; + + // Only assign variables that have been set. + if(isset($this->$field)) + { + // Try comparing this element with the head element. + if(0 == $firstPass) + { + $firstPass = 1; + } + else + { + if($isUpdate) + { + $updKeyValues = $updKeyValues.", "; + } + else + { + $insKeys = $insKeys.", "; + $insValues = $insValues.", "; + } + } + /*else + $query = $query.", "; + + $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; + */ + if($isUpdate) + { + $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + else + { + $insKeys = $insKeys.$field; + $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + } + } + + if($isUpdate) + { + $query = $query.$updKeyValues." WHERE ID = '$this->id'"; + $this->log->info("Update $this->object_name: ".$query); + } + else + { + $query = $query.$insKeys.") VALUES ".$insValues.")"; + $this->log->info("Insert: ".$query); + } + + $this->db->query($query, true); + + // If this is not an update then store the id for later. + if(!$isUpdate && !$this->new_schema && !$this->new_with_id) + { + $this->db->println("Illegal Access - SugarBean"); + //this is mysql specific + $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); + } + + return $this->id; + } + + + /** + * This function retrieves a record of the appropriate type from the DB. + * It fills in all of the vtiger_fields from the DB into the object it was called on. + * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. + * returns this - The object that it was called apon or null if exactly 1 record was not found. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + function retrieve($id = -1, $encodeThis=true) { + if ($id == -1) { + $id = $this->id; + } + if($id == '') { + return null; + } +// GS porting vtiger_crmentity +$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; +// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; + $this->log->debug("Retrieve $this->object_name: ".$query); + + $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); + + if(empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result, -1, $encodeThis); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + */ + + function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { + $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); + + $query = $this->create_list_query($order_by, $where); + + return $this->process_list_query($query, $row_offset, $limit, $max); + } + + /** + * This function returns a full (ie non-paged) list of the current object type. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_full_list($order_by = "", $where = "") { + $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + $result =& $this->db->query($query, false); + + if($this->db->getRowCount($result) > 0){ + + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else { + $this->$field = ''; + } + } + + + $list[] = clone($this); //added clone tosupport PHP5 + } + } + + if (isset($list)) return $list; + else return null; + + } + + function create_list_query($order_by, $where) + { + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + return $query; + } + + + function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) + { + global $list_max_entries_per_page; + $this->log->debug("process_list_query: ".$query); + if(!empty($limit) && $limit != -1){ + $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); + }else{ + $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); + } + + $list = Array(); + if($max_per_page == -1){ + $max_per_page = $list_max_entries_per_page; + } + $rows_found = $this->db->getRowCount($result); + + $this->log->debug("Found $rows_found ".$this->object_name."s"); + + $previous_offset = $row_offset - $max_per_page; + $next_offset = $row_offset + $max_per_page; + + if($rows_found != 0) + { + + // We have some data. + + for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + + $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else + { + $this->$field = ""; + } + } + + + $list[] = clone($this); //added clone to support PHP5 + } + } + + $response = Array(); + $response['list'] = $list; + $response['row_count'] = $rows_found; + $response['next_offset'] = $next_offset; + $response['previous_offset'] = $previous_offset; + + return $response; + } + + + /** + * Track the viewing of a detail record. This leverages get_summary_text() which is object specific + * params $user_id - The user that is viewing the record. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function track_view($user_id, $current_module,$id='') + { + $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); + + $tracker = new Tracker(); + $tracker->track_view($user_id, $current_module, $id, ''); + } + + + /** This function should be overridden in each module. It marks an item as deleted. + * If it is not overridden, then marking this type of item is not allowed + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function mark_deleted($id) + { + $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; + $this->db->query($query, true,"Error marking record deleted: "); + + $this->mark_relationships_deleted($id); + + // Take the item off of the recently viewed lists. + $tracker = new Tracker(); + $tracker->delete_item_history($id); + + } + + + /* This is to allow subclasses to fill in row specific columns of a list view form + function list_view_parse_additional_sections(&$list_form) + { + } + */ + /* This function assigns all of the values into the template for the list view + function get_list_view_array(){ + $return_array = Array(); + + foreach($this->list_fields as $field) + { + $return_array[strtoupper($field)] = $this->$field; + } + + return $return_array; + } + function get_list_view_data() + { + + return $this->get_list_view_array(); + } + + function get_where(&$fields_array) + { + $where_clause = "WHERE "; + $first = 1; + foreach ($fields_array as $name=>$value) + { + if ($first) + { + $first = 0; + } + else + { + $where_clause .= " AND "; + } + + $where_clause .= "$name = ".$adb->quote($value).""; + } + + $where_clause .= " AND deleted=0"; + return $where_clause; + } + + + function retrieve_by_string_fields($fields_array, $encode=true) + { + $where_clause = $this->get_where($fields_array); + + $query = "SELECT * FROM $this->table_name $where_clause"; + $this->log->debug("Retrieve $this->object_name: ".$query); + $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); + if( empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result,-1, $encode); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + + // this method is called during an import before inserting a bean + // define an associative array called $special_fields + // the keys are user defined, and don't directly map to the bean's vtiger_fields + // the value is the method name within that bean that will do extra + // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' + + function process_special_fields() + { + foreach ($this->special_functions as $func_name) + { + if ( method_exists($this,$func_name) ) + { + $this->$func_name(); + } + } + } + + */ +} + + +?> -------------- next part -------------- diff -ruN orig/include/utils/EditViewUtils.php htdocs/include/utils/EditViewUtils.php --- orig/include/utils/EditViewUtils.php 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/utils/EditViewUtils.php 2007-05-07 14:45:15.000000000 +0200 @@ -157,7 +157,7 @@ } $fieldvalue [] = $options; } - elseif($uitype == 17) + elseif($uitype == 17 || $uitype == 18) { $editview_label[]=$mod_strings[$fieldlabel]; $fieldvalue [] = $value; @@ -1194,6 +1194,11 @@ $fieldvalue[] = $value; } + // For inheritance + if ( in_array($uitype,array(3,4,18,31,32)) ) { + $fieldvalue[] = $col_fields[$fieldname."@##@"]; + } + // Mike Crowe Mod --------------------------------------------------------force numerics right justified. if ( !eregi("id=",$custfld) ) $custfld = preg_replace("/debug("Exiting getOutputHtml method ..."); return $final_arr; } @@ -1883,4 +1889,104 @@ } +/** This function returns the detailed list of organization units associated to +* the selected organization +* Param $organization - organization object +*/ + +function getOrgUnits($organization,$orgunitid="") +{ + // The array we're about to build + $orgunittab = array(); + $fields = "orgunitid,type,name,address,city,state,country,code,phone,fax,website"; + $fields .= ",logoname,quote_template,so_template,po_template,invoice_template"; + global $adb; + + // Parameter check + if( !isset( $organization) || $organization == '' || + !isset( $organization->id) || $organization->id == '') + return $orgunittab; + + // Database query + if( $orgunitid != "0") + $query = "SELECT vtiger_orgunit.orgunitid AS orgunitid,"; + else + $query = "SELECT 0 AS orgunitid,"; + + // logoname is only defined in the organization record. + $query .= "'@##@' AS logoname, vtiger_organizationdetails.logoname AS org_logoname"; + + foreach( split( ',', $fields) as $field) { + if( $field != "orgunitid" && $field != "logoname") { + if( $orgunitid != "0") + $query .= ",vtiger_orgunit.".$field." AS ".$field; + else + $query .= ",NULL AS ".$field; + if( $field != "type" && $field != "name") + $query .= ",vtiger_organizationdetails.".$field." AS org_".$field; + } + } + + if( $orgunitid != "0" ) { + // database joins + $query .= " FROM vtiger_orgunit + LEFT JOIN vtiger_organizationdetails + ON vtiger_orgunit.organizationname=vtiger_organizationdetails.organizationname "; + + // single or list query? + if( $orgunitid == "") + $query .= "WHERE vtiger_orgunit.organizationname='".$organization->id."' "; + else + $query .= "WHERE vtiger_orgunit.orgunitid=".$orgunitid." "; + + // do not return deleted orgunits + $query .= "AND vtiger_orgunit.deleted=0"; + } + + else { + $query .= " FROM vtiger_organizationdetails "; + $query .= " WHERE vtiger_organizationdetails.organizationname='".$organization->id."' "; + } + + // Do not return deleted organizations + $query .= " AND vtiger_organizationdetails.deleted=0"; + + $result = $adb->query( $query); + $noofrows = $adb->num_rows($result); + + // Get all rows from database + for($j = 0; $j < $noofrows; $j++) { + $orgunit = array(); + foreach( split( ',', $fields) as $field) { + if( $orgunitid != "0") { + $orgunit[$field] = $adb->query_result($result,$j,$field); + + // Inherited and extended fields + if( substr( $orgunit[$field], 0, 4) == "@##@") { + if( $field == "name") { + $orgunit[$field] = substr($orgunit[$field], 4, strlen( $orgunit[$field])-4); + if( $orgunitid != "") + $orgunit[$field] = $organization->id." ".$orgunit[$field]; + } else { + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + } + + // no orgunit selected + else { + if( $field == "name") + $orgunit[$field] = $organization->id; + elseif( $field == "orgunitid") + $orgunit[$field] = 0; + else + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + $id = $orgunit["orgunitid"]; + $orgunittab[$id] = $orgunit; + } + // Return what we've found + return $orgunittab; +} ?> -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 14:52:56.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-04 15:04:43.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Accounts/Delete.php htdocs/modules/Accounts/Delete.php --- orig/modules/Accounts/Delete.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/Delete.php 2007-05-07 17:04:15.000000000 +0200 @@ -1,37 +1,37 @@ - + -------------- next part -------------- diff -ruN orig/modules/Accounts/DetailViewAjax.php htdocs/modules/Accounts/DetailViewAjax.php --- orig/modules/Accounts/DetailViewAjax.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/DetailViewAjax.php 2007-05-07 17:09:50.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Accounts"); - $acntObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving - { - $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $acntObj->id = $crmid; - $acntObj->mode = "edit"; - $acntObj->save("Accounts"); - if($acntObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Accounts"); + $acntObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving + { + $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $acntObj->id = $crmid; + $acntObj->mode = "edit"; + $acntObj->save("Accounts"); + if($acntObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN orig/Smarty/templates/RelatedLists.tpl htdocs/Smarty/templates/RelatedLists.tpl --- orig/Smarty/templates/RelatedLists.tpl 2007-05-04 16:12:15.000000000 +0200 +++ htdocs/Smarty/templates/RelatedLists.tpl 2007-05-08 22:57:59.000000000 +0200 @@ -122,8 +122,21 @@ {$SINGLE_MOD} {$APP.LBL_INFORMATION} {/if}   - {$APP.LBL_MORE} {$APP.LBL_INFORMATION} -   + {if $MODULE eq 'Products'} + {if $RELATEDLISTS ne ''} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {else} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {/if} +   + {else} + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} +   + {/if} @@ -137,12 +150,12 @@ -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 15:43:12.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-09 00:28:57.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Emails/EmailsAjax.php htdocs/modules/Emails/EmailsAjax.php --- orig/modules/Emails/EmailsAjax.php 2007-05-04 16:12:10.000000000 +0200 +++ htdocs/modules/Emails/EmailsAjax.php 2007-05-09 00:55:09.000000000 +0200 @@ -1,54 +1,54 @@ -retrieve_entity_info($crmid,"Emails"); - $modObj->column_fields[$fieldname] = $fieldvalue; - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Emails"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -elseif($_REQUEST['ajaxmode'] == 'qcreate') -{ - require_once('quickcreate.php'); -} -else -{ - require_once('include/Ajax/CommonAjax.php'); -} -?> +retrieve_entity_info($crmid,"Emails"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Emails"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +elseif($_REQUEST['ajaxmode'] == 'qcreate') +{ + require_once('quickcreate.php'); +} +else +{ + require_once('include/Ajax/CommonAjax.php'); +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Notes/Delete.php htdocs/modules/Notes/Delete.php --- htdocs.orig/modules/Notes/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Notes/Delete.php 2007-05-09 00:57:22.000000000 +0200 @@ -1,35 +1,35 @@ - + -------------- next part -------------- diff -ruN htdocs.orig/modules/Portal/Popup.php htdocs/modules/Portal/Popup.php --- htdocs.orig/modules/Portal/Popup.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Popup.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,68 +1,68 @@ -query($query); - $portalname = $adb->query_result($result,0,'portalname'); - $portalurl = $adb->query_result($result,0,'portalurl'); -} -$portal_inputs=''; -$portal_inputs.='
-
- - {include file='RelatedListsHidden.tpl'} -
- {include file='RelatedListContents.tpl'} -
- + + {include file='RelatedListsHidden.tpl'} +
+ {include file='RelatedListContents.tpl'} +
+ {*-- End of Blocks--*}
- - - - -
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
- - - - -
- - - - - - - - - - - -
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
-
- - - - -
-    - -
-'; - -echo $portal_inputs; - - -?> +query($query); + $portalname = $adb->query_result($result,0,'portalname'); + $portalurl = $adb->query_result($result,0,'portalurl'); +} +$portal_inputs=''; +$portal_inputs.='
+ + + + + +
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
+ + + + +
+ + + + + + + + + + + +
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
+
+ + + + +
+    + +
+
'; + +echo $portal_inputs; + + +?> diff -ruN htdocs.orig/modules/Portal/Portal.php htdocs/modules/Portal/Portal.php --- htdocs.orig/modules/Portal/Portal.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Portal.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,45 +1,45 @@ -println("just entered the SavePortal method"); - $portalid=$adb->getUniqueID('vtiger_portal'); - $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -/** Function to update the portal in database - * @param $portalname : Type String - * @param $portalurl : Type String - * @param $portalid : Type Integer - * This function updates the portal with the given $portalname,$portalurl - * This Returns $portalid - */ -function UpdatePortal($portalname,$portalurl,$portalid) -{ - global $adb; - $adb->println("just entered the SavePortal method"); - $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -?> +println("just entered the SavePortal method"); + $portalid=$adb->getUniqueID('vtiger_portal'); + $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +/** Function to update the portal in database + * @param $portalname : Type String + * @param $portalurl : Type String + * @param $portalid : Type Integer + * This function updates the portal with the given $portalname,$portalurl + * This Returns $portalid + */ +function UpdatePortal($portalname,$portalurl,$portalid) +{ + global $adb; + $adb->println("just entered the SavePortal method"); + $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Settings/TaxConfig.php htdocs/modules/Settings/TaxConfig.php --- htdocs.orig/modules/Settings/TaxConfig.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Settings/TaxConfig.php 2007-05-09 01:00:29.000000000 +0200 @@ -1,244 +1,244 @@ -assign("EDIT_MODE", 'true'); -} -elseif($_REQUEST['sh_edit_tax'] == 'true') -{ - $smarty->assign("SH_EDIT_MODE", 'true'); -} - -//To add tax -if($_REQUEST['add_tax_type'] == 'true') -{ - //Add the given tax name and value as a new tax type - echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); - $getlist = true; -} -elseif($_REQUEST['sh_add_tax_type'] == 'true') -{ - echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); - $getlist = true; -} - -//To Disable ie., delete or enable -if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') -{ - if($_REQUEST['disable'] == 'true') - changeDeleted($_REQUEST['taxname'],1); - else - changeDeleted($_REQUEST['taxname'],0); - $getlist = true; -} -elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') -{ - if($_REQUEST['sh_disable'] == 'true') - changeDeleted($_REQUEST['sh_taxname'],1,'sh'); - else - changeDeleted($_REQUEST['sh_taxname'],0,'sh'); - $getlist = true; -} - -//after done save or enable/disable or added new tax the list will be retrieved again from db -if($getlist) -{ - $tax_details = getAllTaxes(); - $sh_tax_details = getAllTaxes('all','sh'); -} - -$smarty->assign("TAX_COUNT", count($tax_details)); -$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); - -if(count($tax_details) == 0) - $smarty->assign("TAX_COUNT", 0); -if(count($sh_tax_details) == 0) - $smarty->assign("SH_TAX_COUNT", 0); - -$smarty->assign("TAX_VALUES", $tax_details); - -$smarty->assign("SH_TAX_VALUES", $sh_tax_details); - -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("MOD", $mod_strings); -$smarty->display("Settings/TaxConfig.tpl"); - - -/** Function to update the list of Tax percentages for the passed tax types - * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxPercentages($new_percentages, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_percentages as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} - -/** Function to update the list of Tax Labels for the taxes - * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxLabels($new_labels, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_labels as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} -/** Function used to add the tax type which will do database alterations - * @param string $taxlabel - tax label name to be added - * @param string $taxvalue - tax value to be added - * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table - * @return void - */ -function addTaxType($taxlabel, $taxvalue, $sh='') -{ - global $adb, $log; - $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); - - //First we will check whether the tax is already available or not - if($sh != '' && $sh == 'sh') - $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; - else - $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; - $check_res = $adb->query($check_query); - - if($adb->num_rows($check_res) > 0) - return "This tax is already available"; - - //if the tax is not available then add this tax. - //Add this tax as a column in related table - if($sh != '' && $sh == 'sh') - { - $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); - $taxname = "shtax".$taxid; - $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; - } - else - { - $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); - $taxname = "tax".$taxid; - $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; - } - $res = $adb->query($query); - - //if the tax is added as a column then we should add this tax in the list of taxes - if($res) - { - if($sh != '' && $sh == 'sh') - $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - else - $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - - $res1 = $adb->query($query1); - } - - $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); - if($res1) - return ''; - else - return "There may be some problem in adding the Tax type. Please try again"; -} - -/** Function used to Enable or Disable the tax type - * @param string $taxname - taxname to enable or disble - * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable - * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo - * @return void - */ -function changeDeleted($taxname, $deleted, $sh='') -{ - global $log, $adb; - $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); - - if($sh == 'sh') - $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); - else - $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); - $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); -} - -?> +assign("EDIT_MODE", 'true'); +} +elseif($_REQUEST['sh_edit_tax'] == 'true') +{ + $smarty->assign("SH_EDIT_MODE", 'true'); +} + +//To add tax +if($_REQUEST['add_tax_type'] == 'true') +{ + //Add the given tax name and value as a new tax type + echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); + $getlist = true; +} +elseif($_REQUEST['sh_add_tax_type'] == 'true') +{ + echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); + $getlist = true; +} + +//To Disable ie., delete or enable +if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') +{ + if($_REQUEST['disable'] == 'true') + changeDeleted($_REQUEST['taxname'],1); + else + changeDeleted($_REQUEST['taxname'],0); + $getlist = true; +} +elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') +{ + if($_REQUEST['sh_disable'] == 'true') + changeDeleted($_REQUEST['sh_taxname'],1,'sh'); + else + changeDeleted($_REQUEST['sh_taxname'],0,'sh'); + $getlist = true; +} + +//after done save or enable/disable or added new tax the list will be retrieved again from db +if($getlist) +{ + $tax_details = getAllTaxes(); + $sh_tax_details = getAllTaxes('all','sh'); +} + +$smarty->assign("TAX_COUNT", count($tax_details)); +$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); + +if(count($tax_details) == 0) + $smarty->assign("TAX_COUNT", 0); +if(count($sh_tax_details) == 0) + $smarty->assign("SH_TAX_COUNT", 0); + +$smarty->assign("TAX_VALUES", $tax_details); + +$smarty->assign("SH_TAX_VALUES", $sh_tax_details); + +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("APP", $app_strings); +$smarty->assign("MOD", $mod_strings); +$smarty->display("Settings/TaxConfig.tpl"); + + +/** Function to update the list of Tax percentages for the passed tax types + * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxPercentages($new_percentages, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_percentages as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} + +/** Function to update the list of Tax Labels for the taxes + * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxLabels($new_labels, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_labels as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} +/** Function used to add the tax type which will do database alterations + * @param string $taxlabel - tax label name to be added + * @param string $taxvalue - tax value to be added + * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table + * @return void + */ +function addTaxType($taxlabel, $taxvalue, $sh='') +{ + global $adb, $log; + $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); + + //First we will check whether the tax is already available or not + if($sh != '' && $sh == 'sh') + $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; + else + $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; + $check_res = $adb->query($check_query); + + if($adb->num_rows($check_res) > 0) + return "This tax is already available"; + + //if the tax is not available then add this tax. + //Add this tax as a column in related table + if($sh != '' && $sh == 'sh') + { + $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); + $taxname = "shtax".$taxid; + $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; + } + else + { + $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); + $taxname = "tax".$taxid; + $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; + } + $res = $adb->query($query); + + //if the tax is added as a column then we should add this tax in the list of taxes + if($res) + { + if($sh != '' && $sh == 'sh') + $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + else + $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + + $res1 = $adb->query($query1); + } + + $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); + if($res1) + return ''; + else + return "There may be some problem in adding the Tax type. Please try again"; +} + +/** Function used to Enable or Disable the tax type + * @param string $taxname - taxname to enable or disble + * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable + * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo + * @return void + */ +function changeDeleted($taxname, $deleted, $sh='') +{ + global $log, $adb; + $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); + + if($sh == 'sh') + $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); + else + $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); + $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); +} + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Users/DetailViewAjax.php htdocs/modules/Users/DetailViewAjax.php --- htdocs.orig/modules/Users/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/DetailViewAjax.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,35 +1,35 @@ - "; -$local_log =& LoggerManager::getLogger('UsersAjax'); +$local_log =& LoggerManager::getLogger('UsersAjax'); $my_status = "Failure"; -$ajaxaction = $_REQUEST["ajxaction"]; -if($ajaxaction == "DETAILVIEW") -{ - $crmid = $_REQUEST["recordid"]; - $tablename = $_REQUEST["tableName"]; - $fieldname = $_REQUEST["fldName"]; - $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); +$ajaxaction = $_REQUEST["ajxaction"]; +if($ajaxaction == "DETAILVIEW") +{ + $crmid = $_REQUEST["recordid"]; + $tablename = $_REQUEST["tableName"]; + $fieldname = $_REQUEST["fldName"]; + $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); $local_log->debug("Entering DetailViewAjax crmid=".$crmid." tab=".$tablename." fld=".$fieldname." val='".$fieldvalue."'"); - if($crmid != "") - { - $userObj = new Users(); - $userObj->retrieve_entity_info($crmid,"Users"); + if($crmid != "") + { + $userObj = new Users(); + $userObj->retrieve_entity_info($crmid,"Users"); //assigned organizations if( $fieldname == 'assigned_org[]') { @@ -173,30 +173,30 @@ $adb->completeTransaction(); //Organization assignment - require('modules/Users/GetUserOrg.php'); + require('modules/Users/GetUserOrg.php'); } //anything else is a field update else { - $userObj->column_fields[$fieldname] = $fieldvalue; - $userObj->id = $crmid; - $userObj->mode = "edit"; - $userObj->save("Users"); + $userObj->column_fields[$fieldname] = $fieldvalue; + $userObj->id = $crmid; + $userObj->mode = "edit"; + $userObj->save("Users"); } //result would be success as long as the user exists - if($userObj->id != "") - { - echo ":#:SUCCESS"; + if($userObj->id != "") + { + echo ":#:SUCCESS"; $my_status = "Success"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } $local_log->debug("Exit DetailViewAjax: ".$my_status); -} -?> +} +?> diff -ruN htdocs.orig/modules/Users/EditView.php htdocs/modules/Users/EditView.php --- htdocs.orig/modules/Users/EditView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/EditView.php 2007-05-09 01:01:55.000000000 +0200 @@ -42,7 +42,7 @@ $smarty->assign("ID",$_REQUEST['record']); $mode='edit'; if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) die ("Unauthorized access to user administration."); - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); $smarty->assign("USERNAME",$focus->last_name.' '.$focus->first_name); }else { @@ -59,6 +59,11 @@ $focus->column_fields['confirm_password']=''; } +if(is_admin($current_user)) + $smarty->assign("IS_ADMIN", true); +else + $smarty->assign("IS_ADMIN", false); + global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; @@ -111,9 +116,57 @@ $smarty->assign("HOMEORDER",$focus->getHomeOrder($focus->id)); $smarty->assign("DUPLICATE",$_REQUEST['isDuplicate']); - $smarty->assign('PARENTTAB',$_REQUEST['parenttab']); +//Organization assignment +if( $mode == "create" ) { + $orgs = array(); + $smarty_orgs = array($orgs); + + //all organizations + $sql = "SELECT organizationname FROM vtiger_organizationdetails WHERE deleted=0"; + $result = $adb->query($sql); + $allorgs = array(); + while($org_result = $adb->fetch_array($result)) { + $key = $org_result["organizationname"]; + $allorgs[$key] = ''; + } + $smarty_allorgs = array($allorgs); + + //Organization untis + $orgunits = array(); + $smarty_orgunits = array($orgunits); + + //The remaining field are intentially left blank + $curorg = ""; + $assigned_org = ""; + $prim_orgunits = ""; + $org_separator = "
 "; + + //Set up session variables + $_SESSION['all_user_organizations'] = $smarty_allorgs; + $_SESSION['edit_user_organizations'] = $smarty_orgs; + $_SESSION['edit_user_orgunits'] = $smarty_orgunits; + $_SESSION['edit_user_primary_organization'] = $curorg; + $_SESSION['edit_user_assigned_organization'] = $assigned_org; + $_SESSION['edit_user_primary_orgunits'] = $prim_orgunits; +} + +//In case of edit mode use the predefined gathering fuction +else { + $crmid = $focus->id; + require('modules/Users/GetUserOrg.php'); +} + +//Assign the organization details to the html output +$smarty->assign("MULTISELECT_COMBO_BOX_ITEM_SEPARATOR_STRING", $org_separator); +$smarty->assign("ALL_USER_ORGANIZATIONS", $smarty_allorgs); +$smarty->assign("EDIT_USER_ORGANIZATIONS", $smarty_orgs); +$smarty->assign("EDIT_USER_ORGUNITS", $smarty_orgunits); +$smarty->assign("EDIT_USER_PRIMARY_ORGANIZATION", $curorg); +$smarty->assign("EDIT_USER_ASSIGNED_ORGANIZATIONS", $assigned_org); +$smarty->assign("EDIT_USER_PRIMARY_ORGUNITS", $prim_orgunits); + $smarty->display('UserEditView.tpl'); ?> diff -ruN htdocs.orig/modules/Users/ListView.php htdocs/modules/Users/ListView.php --- htdocs.orig/modules/Users/ListView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/ListView.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,82 +1,82 @@ -query($list_query); -//Retreive the Navigation array -$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); - -$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("CMOD", $mod_strings); -$smarty->assign("APP", $app_strings); -$smarty->assign("CURRENT_USERID", $current_user->id); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("CATEGORY",$category); -$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); -$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); -$smarty->assign("USER_COUNT",$no_of_users); -$smarty->assign("RECORD_COUNTS", $record_string); -$smarty->assign("NAVIGATION", $navigationOutput); -$smarty->assign("USER_IMAGES",getUserImageNames()); -if($_REQUEST['ajax'] !='') - $smarty->display("UserListViewContents.tpl"); -else - $smarty->display("UserListView.tpl"); - -?> +query($list_query); +//Retreive the Navigation array +$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); + +$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("CMOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("CURRENT_USERID", $current_user->id); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("CATEGORY",$category); +$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); +$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); +$smarty->assign("USER_COUNT",$no_of_users); +$smarty->assign("RECORD_COUNTS", $record_string); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("USER_IMAGES",getUserImageNames()); +if($_REQUEST['ajax'] !='') + $smarty->display("UserListViewContents.tpl"); +else + $smarty->display("UserListView.tpl"); + +?> diff -ruN htdocs.orig/modules/Users/Logout.php htdocs/modules/Users/Logout.php --- htdocs.orig/modules/Users/Logout.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Logout.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,109 +1,109 @@ -query($query); - $num_rows = $adb->num_rows($result); - if($num_rows > 0) - { - $ftpserver = $adb->query_result($result,0,'server'); - $ftpuser = $adb->query_result($result,0,'server_username'); - $ftppassword = $adb->query_result($result,0,'server_password'); - } - - //Taking the Backup of DB - $currenttime=date("Ymd_His"); - if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') - { $backupFileName="backup_".$currenttime.".sql"; - save_structure($backupFileName, $root_directory); - $source_file=$backupFileName; - ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); - if(file_exists($source_file)) unlink($source_file); - - } -} -// Recording Logout Info - $usip=$_SERVER['REMOTE_ADDR']; - $outtime=date("Y/m/d H:i:s"); - $loghistory=new LoginHistory(); - $loghistory->user_logout($current_user->user_name,$usip,$outtime); - - -$local_log =& LoggerManager::getLogger('Logout'); - -//Calendar Logout -//include('modules/Calendar/logout.php'); - -// clear out the autthenticating flag -session_destroy(); - -define("IN_LOGIN", true); - -// define('IN_PHPBB', true); -// include($phpbb_root_path . 'extension.inc'); -// include($phpbb_root_path . 'common.'.$phpEx); - -// -// Set page ID for session management -// -//$userdata = session_pagestart($user_ip, PAGE_LOGIN); -//init_userprefs($userdata); -// -// End session management -// - -// session id check -/* -if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) -{ - $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; -} -else -{ - $sid = ''; -} -if( $userdata['session_logged_in'] ) - { - if( $userdata['session_logged_in'] ) - { - session_end($userdata['session_id'], $userdata['user_id']); - } - - } -*/ -// go to the login screen. -header("Location: index.php?action=Login&module=Users"); -?> +query($query); + $num_rows = $adb->num_rows($result); + if($num_rows > 0) + { + $ftpserver = $adb->query_result($result,0,'server'); + $ftpuser = $adb->query_result($result,0,'server_username'); + $ftppassword = $adb->query_result($result,0,'server_password'); + } + + //Taking the Backup of DB + $currenttime=date("Ymd_His"); + if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') + { $backupFileName="backup_".$currenttime.".sql"; + save_structure($backupFileName, $root_directory); + $source_file=$backupFileName; + ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); + if(file_exists($source_file)) unlink($source_file); + + } +} +// Recording Logout Info + $usip=$_SERVER['REMOTE_ADDR']; + $outtime=date("Y/m/d H:i:s"); + $loghistory=new LoginHistory(); + $loghistory->user_logout($current_user->user_name,$usip,$outtime); + + +$local_log =& LoggerManager::getLogger('Logout'); + +//Calendar Logout +//include('modules/Calendar/logout.php'); + +// clear out the autthenticating flag +session_destroy(); + +define("IN_LOGIN", true); + +// define('IN_PHPBB', true); +// include($phpbb_root_path . 'extension.inc'); +// include($phpbb_root_path . 'common.'.$phpEx); + +// +// Set page ID for session management +// +//$userdata = session_pagestart($user_ip, PAGE_LOGIN); +//init_userprefs($userdata); +// +// End session management +// + +// session id check +/* +if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) +{ + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; +} +else +{ + $sid = ''; +} +if( $userdata['session_logged_in'] ) + { + if( $userdata['session_logged_in'] ) + { + session_end($userdata['session_id'], $userdata['user_id']); + } + + } +*/ +// go to the login screen. +header("Location: index.php?action=Login&module=Users"); +?> diff -ruN htdocs.orig/modules/Users/Save.php htdocs/modules/Users/Save.php --- htdocs.orig/modules/Users/Save.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Save.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,168 +1,168 @@ -query($query); - if($adb->num_rows($result) > 0) - { - echo 'User Name Already Exists!'; - die; - }else - { - echo 'SUCCESS'; - die; - } -} - -if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); -elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); - -$focus = new Users(); -if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') -{ - $focus->mode='edit'; - $focus->id = $_REQUEST["record"]; -} -else -{ - $focus->mode=''; -} - - -if($_REQUEST['changepassword'] == 'true') -{ - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); - $focus->id = $_REQUEST['record']; -if (isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $old_pass = $_POST['old_password']; - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -} - - -//save user Image -if(! $_REQUEST['changepassword'] == 'true') -{ - if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - - if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; - //Code contributed by mike crowe for rearrange the home page and tab - if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; - if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; - - setObjectValuesFromRequest(&$focus); - $focus->saveentity("Users"); - //$focus->imagename = $image_upload_array['imagename']; - $focus->saveHomeOrder($focus->id); - $return_id = $focus->id; - -if (isset($_POST['user_name']) && isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -if(isset($focus->id) && $focus->id != '') -{ - - if(isset($_POST['user_role'])) - { - updateUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name']) && $_POST['group_name'] != '') - { - updateUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} -else -{ - if(isset($_POST['user_role'])) - { - insertUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name'])) - { - insertUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} - -//Creating the Privileges Flat File -require_once('modules/Users/CreateUserPrivilegeFile.php'); -createUserPrivilegesfile($focus->id); -createUserSharingPrivilegesfile($focus->id); - -} -if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; -else $return_module = "Users"; -if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; -else $return_action = "DetailView"; -if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; -if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; -if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; - -$log->debug("Saved record with id of ".$return_id); - - - -if($_REQUEST['modechk'] == 'prefview') - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); -else - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); - - -?> +query($query); + if($adb->num_rows($result) > 0) + { + echo 'User Name Already Exists!'; + die; + }else + { + echo 'SUCCESS'; + die; + } +} + +if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); +elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); + +$focus = new Users(); +if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') +{ + $focus->mode='edit'; + $focus->id = $_REQUEST["record"]; +} +else +{ + $focus->mode=''; +} + + +if($_REQUEST['changepassword'] == 'true') +{ + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->id = $_REQUEST['record']; +if (isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $old_pass = $_POST['old_password']; + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +} + + +//save user Image +if(! $_REQUEST['changepassword'] == 'true') +{ + if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + + if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; + //Code contributed by mike crowe for rearrange the home page and tab + if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; + if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; + + setObjectValuesFromRequest(&$focus); + $focus->saveentity("Users"); + //$focus->imagename = $image_upload_array['imagename']; + $focus->saveHomeOrder($focus->id); + $return_id = $focus->id; + +if (isset($_POST['user_name']) && isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +if(isset($focus->id) && $focus->id != '') +{ + + if(isset($_POST['user_role'])) + { + updateUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name']) && $_POST['group_name'] != '') + { + updateUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} +else +{ + if(isset($_POST['user_role'])) + { + insertUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name'])) + { + insertUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} + +//Creating the Privileges Flat File +require_once('modules/Users/CreateUserPrivilegeFile.php'); +createUserPrivilegesfile($focus->id); +createUserSharingPrivilegesfile($focus->id); + +} +if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; +else $return_module = "Users"; +if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; +else $return_action = "DetailView"; +if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; +if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; +if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; + +$log->debug("Saved record with id of ".$return_id); + + + +if($_REQUEST['modechk'] == 'prefview') + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); +else + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); + + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Products/Delete.php htdocs/modules/Products/Delete.php --- htdocs.orig/modules/Products/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/Delete.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,40 +1,40 @@ - + diff -ruN htdocs.orig/modules/Products/DetailViewAjax.php htdocs/modules/Products/DetailViewAjax.php --- htdocs.orig/modules/Products/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/DetailViewAjax.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Products"); - $modObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'unit_price')//unit price converted to dollar value while saving - { - $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Products"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Products"); + $modObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'unit_price')//unit price converted to dollar value while saving + { + $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Products"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php --- htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 01:04:34.000000000 +0200 @@ -1,125 +1,125 @@ -$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries - */ -function getTopPurchaseOrder() -{ - require_once("data/Tracker.php"); - require_once('modules/PurchaseOrder/PurchaseOrder.php'); - require_once('include/logging.php'); - require_once('include/ListView/ListView.php'); - require_once('include/database/PearDatabase.php'); - require_once('include/ComboUtil.php'); - require_once('include/utils/utils.php'); - require_once('modules/CustomView/CustomView.php'); - - global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; - $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); - - $log = LoggerManager::getLogger('po_list'); - - $url_string = ''; - $sorder = ''; - $oCustomView = new CustomView("PurchaseOrder"); - $customviewcombo_html = $oCustomView->getCustomViewCombo(); - if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') - { - if($oCustomView->setdefaultviewid != "") - { - $viewid = $oCustomView->setdefaultviewid; - }else - { - $viewid = "0"; - } - } - $focus = new PurchaseOrder(); - - $theme_path="themes/".$theme."/"; - $image_path=$theme_path."images/"; - - //Retreive the list from Database - //<<<<<<<<>>>>>>>> - $date_var = date('Y-m-d'); - - $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; - $query = getListQuery("PurchaseOrder",$where); - $query .=" ORDER BY total DESC"; - - //<<<<<<<>>>>>>>> - - $list_result = $adb->limitQuery($query,0,5); - - //Retreiving the no of rows - $noofrows = $adb->num_rows($list_result); - - //Retreiving the start value from request - if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') - { - $start = $_REQUEST['start']; - } - else - { - - $start = 1; - } - - //Retreive the Navigation array - $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); - - if ($navigation_array['start'] == 1) - { - if($noofrows != 0) - $start_rec = $navigation_array['start']; - else - $start_rec = 0; - if($noofrows > $list_max_entries_per_page) - { - $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; - } - else - { - $end_rec = $noofrows; - } - - } - else - { - if($navigation_array['next'] > $list_max_entries_per_page) - { - $start_rec = $navigation_array['next'] - $list_max_entries_per_page; - $end_rec = $navigation_array['next'] - 1; - } - else - { - $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; - $end_rec = $noofrows; - } - } - - - //Retreive the List View Table Header - $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); - $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); - - $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); - $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); - if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) - return $values; -} -?> - +$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries + */ +function getTopPurchaseOrder() +{ + require_once("data/Tracker.php"); + require_once('modules/PurchaseOrder/PurchaseOrder.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + require_once('include/database/PearDatabase.php'); + require_once('include/ComboUtil.php'); + require_once('include/utils/utils.php'); + require_once('modules/CustomView/CustomView.php'); + + global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; + $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); + + $log = LoggerManager::getLogger('po_list'); + + $url_string = ''; + $sorder = ''; + $oCustomView = new CustomView("PurchaseOrder"); + $customviewcombo_html = $oCustomView->getCustomViewCombo(); + if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') + { + if($oCustomView->setdefaultviewid != "") + { + $viewid = $oCustomView->setdefaultviewid; + }else + { + $viewid = "0"; + } + } + $focus = new PurchaseOrder(); + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + //Retreive the list from Database + //<<<<<<<<>>>>>>>> + $date_var = date('Y-m-d'); + + $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; + $query = getListQuery("PurchaseOrder",$where); + $query .=" ORDER BY total DESC"; + + //<<<<<<<>>>>>>>> + + $list_result = $adb->limitQuery($query,0,5); + + //Retreiving the no of rows + $noofrows = $adb->num_rows($list_result); + + //Retreiving the start value from request + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + { + $start = $_REQUEST['start']; + } + else + { + + $start = 1; + } + + //Retreive the Navigation array + $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); + + if ($navigation_array['start'] == 1) + { + if($noofrows != 0) + $start_rec = $navigation_array['start']; + else + $start_rec = 0; + if($noofrows > $list_max_entries_per_page) + { + $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; + } + else + { + $end_rec = $noofrows; + } + + } + else + { + if($navigation_array['next'] > $list_max_entries_per_page) + { + $start_rec = $navigation_array['next'] - $list_max_entries_per_page; + $end_rec = $navigation_array['next'] - 1; + } + else + { + $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; + $end_rec = $noofrows; + } + } + + + //Retreive the List View Table Header + $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); + $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); + + $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); + $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); + if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) + return $values; +} +?> + -------------- next part -------------- diff -ruN htdocs.orig/modules/Potentials/language/en_us.lang.php htdocs/modules/Potentials/language/en_us.lang.php --- htdocs.orig/modules/Potentials/language/en_us.lang.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Potentials/language/en_us.lang.php 2007-05-09 01:05:32.000000000 +0200 @@ -1,153 +1,153 @@ -'Potentials', -'LBL_MODULE_TITLE'=>'Potentials: Home', -'LBL_SEARCH_FORM_TITLE'=>'Potential Search', -'LBL_LIST_FORM_TITLE'=>'Potential List', -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_OPPORTUNITY'=>'Potential:', -'LBL_NAME'=>'Potential Name', -'LBL_INVITEE'=>'Contacts', -'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_PRODUCT_NAME'=>'Product Name', -'LBL_LIST_AMOUNT'=>'Amount', -'LBL_LIST_DATE_CLOSED'=>'Expected Close', -'LBL_LIST_SALES_STAGE'=>'Sales Stage', - -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_AMOUNT'=>'Amount:', -'LBL_DATE_CLOSED'=>'Expected Close Date:', -'LBL_TYPE'=>'Type:', -'LBL_NEXT_STEP'=>'Next Step:', -'LBL_LEAD_SOURCE'=>'Lead Source:', -'LBL_SALES_STAGE'=>'Sales Stage:', -'LBL_PROBABILITY'=>'Probability (%):', -'LBL_DESCRIPTION'=>'Description:', -'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', - -'LBL_NEW_FORM_TITLE'=>'New Potential', - -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", -'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", - -'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', - -'NTC_NONE_SCHEDULED'=>'None scheduled.', - -'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', -'LBL_GENERAL_INFORMATION'=>'General Information', - - - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_NOTE'=>'New Note', -'LBL_NOTE_TITLE'=>'Notes', - -'LBL_NEW_ATTACHMENT'=>'New Attachment', -'LBL_ATTACHMENT_TITLE'=>'Attachments', - -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_WON'=>'Won', -'LBL_LOST'=>'Lost', -'LBL_VALUE_PROPOSITION'=>'Value Proposition', -'LBL_PROSPECTING'=>'Prospecting', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Potential Tools', -//Added for 4GA -'Potential Name'=>'Potential Name', -'Amount'=>'Amount', -'Account Name'=>'Account Name', -'Currency'=>'Currency', -'Expected Close Date'=>'Expected Close Date', -'Opportunity Type'=>'Opportunity Type', -'Type'=>'Type', -'Next Step'=>'Next Step', -'Lead Source'=>'Lead Source', -'Sales Stage'=>'Sales Stage', -'Assigned To'=>'Assigned To', -'Probability'=>'Probability (%)', -'Campaign Source'=>'Campaign Source', -'Description'=>'Description', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Organization unit'=>'Organization unit', -//Added for 4.2 Release -- CustomView -'Potential'=>'Potential', -'Expected Close'=>'Expected Close', - -//Added for Existing Picklist Strings - -'Prospecting'=>'Prospecting', -'Qualification'=>'Qualification', -'Needs Analysis'=>'Needs Analysis', -'Value Proposition'=>'Value Proposition', -'Id. Decision Makers'=>'Id. Decision Makers', -'Perception Analysis'=>'Perception Analysis', -'Proposal/Price Quote'=>'Proposal/Price Quote', -'Negotiation/Review'=>'Negotiation/Review', -'Closed Won'=>'Closed Won', -'Closed Lost'=>'Closed Lost', - -'Cold Call'=>'Cold Call', -'Existing Customer'=>'Existing Customer', -'Self Generated'=>'Self Generated', -'Employee'=>'Employee', -'Partner'=>'Partner', -'Public Relations'=>'Public Relations', -'Direct Mail'=>'Direct Mail', -'Conference'=>'Conference', -'Trade Show'=>'Trade Show', -'Web Site'=>'Web Site', -'Word of mouth'=>'Word of mouth', -'Other'=>'Other', - -'--None--'=>'--None--', -'Existing Business'=>'Existing Business', -'New Business'=>'New Business', - - - -); - -?> +'Potentials', +'LBL_MODULE_TITLE'=>'Potentials: Home', +'LBL_SEARCH_FORM_TITLE'=>'Potential Search', +'LBL_LIST_FORM_TITLE'=>'Potential List', +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_OPPORTUNITY'=>'Potential:', +'LBL_NAME'=>'Potential Name', +'LBL_INVITEE'=>'Contacts', +'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_PRODUCT_NAME'=>'Product Name', +'LBL_LIST_AMOUNT'=>'Amount', +'LBL_LIST_DATE_CLOSED'=>'Expected Close', +'LBL_LIST_SALES_STAGE'=>'Sales Stage', + +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_AMOUNT'=>'Amount:', +'LBL_DATE_CLOSED'=>'Expected Close Date:', +'LBL_TYPE'=>'Type:', +'LBL_NEXT_STEP'=>'Next Step:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_SALES_STAGE'=>'Sales Stage:', +'LBL_PROBABILITY'=>'Probability (%):', +'LBL_DESCRIPTION'=>'Description:', +'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +'LBL_NEW_FORM_TITLE'=>'New Potential', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", +'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", + +'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', + +'NTC_NONE_SCHEDULED'=>'None scheduled.', + +'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', +'LBL_GENERAL_INFORMATION'=>'General Information', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Note', +'LBL_NOTE_TITLE'=>'Notes', + +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_ATTACHMENT_TITLE'=>'Attachments', + +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_WON'=>'Won', +'LBL_LOST'=>'Lost', +'LBL_VALUE_PROPOSITION'=>'Value Proposition', +'LBL_PROSPECTING'=>'Prospecting', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Potential Tools', +//Added for 4GA +'Potential Name'=>'Potential Name', +'Amount'=>'Amount', +'Account Name'=>'Account Name', +'Currency'=>'Currency', +'Expected Close Date'=>'Expected Close Date', +'Opportunity Type'=>'Opportunity Type', +'Type'=>'Type', +'Next Step'=>'Next Step', +'Lead Source'=>'Lead Source', +'Sales Stage'=>'Sales Stage', +'Assigned To'=>'Assigned To', +'Probability'=>'Probability (%)', +'Campaign Source'=>'Campaign Source', +'Description'=>'Description', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Organization unit'=>'Organization unit', +//Added for 4.2 Release -- CustomView +'Potential'=>'Potential', +'Expected Close'=>'Expected Close', + +//Added for Existing Picklist Strings + +'Prospecting'=>'Prospecting', +'Qualification'=>'Qualification', +'Needs Analysis'=>'Needs Analysis', +'Value Proposition'=>'Value Proposition', +'Id. Decision Makers'=>'Id. Decision Makers', +'Perception Analysis'=>'Perception Analysis', +'Proposal/Price Quote'=>'Proposal/Price Quote', +'Negotiation/Review'=>'Negotiation/Review', +'Closed Won'=>'Closed Won', +'Closed Lost'=>'Closed Lost', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', +'Other'=>'Other', + +'--None--'=>'--None--', +'Existing Business'=>'Existing Business', +'New Business'=>'New Business', + + + +); + +?> -------------- next part -------------- diff -ruN htdocs.orig/parent_tabdata.php htdocs/parent_tabdata.php --- htdocs.orig/parent_tabdata.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/parent_tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,13 +1,21 @@ 'My Home Page',2=>'Marketing',3=>'Sales',4=>'Support',5=>'Analytics',6=>'Inventory',7=>'Tools',8=>'Settings'); -$parent_child_tab_rel_array=array(1=>array(3,9,28,),2=>array(26,6,4,28,7,9,8,),3=>array(7,6,4,2,20,22,23,14,19,8,9,),4=>array(13,15,6,4,14,8,28,9,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(30,31,),); +$parent_child_tab_rel_array=array(1=>array(3,9,10,),2=>array(26,6,4,),3=>array(7,6,4,2,20,22,23,14,19,8,),4=>array(13,15,6,4,14,8,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(),); -?> \ No newline at end of file +?> diff -ruN htdocs.orig/tabdata.php htdocs/tabdata.php --- htdocs.orig/tabdata.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,15 +1,17 @@ 3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,'Organization'=>30,'OrgUnit'=>31,); - -$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,'29'=>0,'30'=>0,'31'=>0,); - -$tab_ownedby_array=array('3'=>1,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>1,'9'=>0,'10'=>1,'13'=>0,'14'=>1,'1'=>1,'15'=>1,'16'=>0,'18'=>1,'19'=>1,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>1,'25'=>1,'26'=>0,'27'=>1,'28'=>1,'29'=>1,'30'=>0,'31'=>0,); - -$action_id_array=array('Save'=>0,'EditView'=>1,'Delete'=>2,'index'=>3,'DetailView'=>4,'Import'=>5,'Export'=>6,'Merge'=>8,'VendorEditView'=>1,'VendorDetailView'=>4,'SaveVendor'=>0,'DeleteVendor'=>2,'PriceBookEditView'=>1,'PriceBookDetailView'=>4,'SavePriceBook'=>0,'DeletePriceBook'=>2,'ConvertLead'=>9,'DetailViewAjax'=>1,'TagCloud'=>4,'QuickCreate'=>1,'Popup'=>3); +$tab_info_array=array('Home'=>3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,); -$action_name_array=array(0=>'Save',1=>'EditView',2=>'Delete',3=>'index',4=>'DetailView',5=>'Import',6=>'Export',8=>'Merge',9=>'ConvertLead'); -?> \ No newline at end of file +$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,); +?> -------------- next part -------------- diff -ruN htdocs.orig/themes/alphagrey/header.php htdocs/themes/alphagrey/header.php --- htdocs.orig/themes/alphagrey/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/alphagrey/header.php 2007-05-09 01:56:53.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/bluelagoon/header.php htdocs/themes/bluelagoon/header.php --- htdocs.orig/themes/bluelagoon/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/bluelagoon/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/woodspice/header.php htdocs/themes/woodspice/header.php --- htdocs.orig/themes/woodspice/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/woodspice/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> From weigelt at metux.de Thu May 10 11:20:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:20:49 +0200 Subject: [Vtigercrm-developers] [PATCH] __toString() fix Message-ID: <20070510152049.GB25395@nibiru.local> Hi folks, there were some __toString() methods necessary ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN cleaned/data/CRMEntity.php working/data/CRMEntity.php --- cleaned/data/CRMEntity.php 2007-05-03 17:50:00.000000000 +0200 +++ working/data/CRMEntity.php 2007-05-03 23:38:06.000000000 +0200 @@ -25,10 +25,16 @@ require_once('data/Tracker.php'); require_once('include/utils/utils.php'); require_once('include/utils/UserInfoUtil.php'); - -class CRMEntity -{ - /** + +class CRMEntity +{ + /* generic toString() method added by nekrad */ + function __toString() + { + return serialize($this); + } + + /** * This method implements a generic insert and update logic for any SugarBean * This method only works for subclasses that implement the same variable names. * This method uses the presence of an id vtiger_field that is not null to signify and update. diff -ruN cleaned/modules/Users/Users.php working/modules/Users/Users.php --- cleaned/modules/Users/Users.php 2007-05-04 02:32:05.000000000 +0200 +++ working/modules/Users/Users.php 2007-05-04 02:59:03.000000000 +0200 @@ -163,6 +163,11 @@ $this->log->debug("Exiting Users() method ..."); } + function __toString() + { + return "[[USERS]]"; + } + // Mike Crowe Mod --------------------------------------------------------Default ordering for us /** * Function to get sort order From weigelt at metux.de Thu May 10 11:21:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:21:41 +0200 Subject: [Vtigercrm-developers] [PATCH] remove noise in invoice module Message-ID: <20070510152141.GC25395@nibiru.local> Hi folks, this patch removes some noise in the invoice module ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/js/Inventory.js htdocs/include/js/Inventory.js --- orig/include/js/Inventory.js 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/js/Inventory.js 2007-05-08 21:51:32.000000000 +0200 @@ -225,8 +225,8 @@ var max_row_count = document.getElementById('proTab').rows.length; max_row_count = eval(max_row_count)-2;//As the table has two header rows, we will reduce two from table row length - if(!FindDuplicate()) - return false; +// if(!FindDuplicate()) +// return false; if(max_row_count == 0) { @@ -357,12 +357,12 @@ } } } - if(duplicate) - { - //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); - if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) - return false; - } +// if(duplicate) +// { +// //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); +// if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) +// return false; +// } return true; } From weigelt at metux.de Thu May 10 11:26:38 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:26:38 +0200 Subject: [Vtigercrm-developers] [PATCH] render API v1 Message-ID: <20070510152638.GD25395@nibiru.local> Hi folks, here're some patches to introduce my new preprint rendering API. For now there's just an latex backend, but adding more should be quite simple. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/lib/render/README htdocs/lib/render/README --- htdocs.orig/lib/render/README 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/README 2007-05-09 13:53:10.000000000 +0200 @@ -0,0 +1 @@ +This subdirectory contains the TeX rendering stuff. diff -ruN htdocs.orig/lib/render/RenderFactory.php htdocs/lib/render/RenderFactory.php --- htdocs.orig/lib/render/RenderFactory.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/RenderFactory.php 2007-05-09 17:05:57.000000000 +0200 @@ -0,0 +1,64 @@ +engine = $e; + } + + function __toString() + { + return "Unknown Engine: \"".$this->engine."\""; + } +} + +class E_Render_FormatNotSupportedByEngine extends Exception +{ + var $engine; + var $format; + + function E_Render_FormatNotSupportedByEngine($format,$engine) + { + $this->format = $format; + $this->engine = $engine; + } + + function __toString() + { + return "Format \"".$this->format. + "\" not supported by engine \"". + $this->engine. + "\""; + } +} + +class RenderFactory +{ + /* public static */ function getRenderer_Invoice($param) + { + if (!($f = $param{'format'})) + throw new Exception("missing output format"); + if (!($e = $param{'engine'})) + throw new Exception("missing engine"); + + switch ($e) + { + case 'pdflatex': + { + if ($f != 'application/pdf') + throw new E_Render_FormatNotSupportedByEngine($f,$e); + + require_once(RENDER_LIB_PREFIX.'TexRender_Invoice.php'); + return new TexRender_Invoice($param); + } + default: + throw new E_Render_UnknownEngine($e); + } + } +} diff -ruN htdocs.orig/lib/render/TexEncode.php htdocs/lib/render/TexEncode.php --- htdocs.orig/lib/render/TexEncode.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/TexEncode.php 2007-05-10 02:51:50.000000000 +0200 @@ -0,0 +1,101 @@ + + +*/ + +// NOTE: the webserver needs *write* acccess to this directory +// we normally take the session storage dir +define('TEXRENDER_TMP_MASK', '{SESSION.SAVE_PATH}/texrender-{SESSION.ID}-{NAME}'); +define('TEXRENDER_TEMPLATE_DIR', 'templates/tex/{TEMPLATE-NAME}/'); + +require_once(RENDER_LIB_PREFIX.'TexEncode.php'); + +class TexRender_Invoice +{ + /* private */ var $tmpmask; + /* private */ var $data; + /* private */ var $product_items; + /* private */ var $fn_tex; + /* private */ var $fn_pdf; + /* private */ var $fn_template; + /* private */ var $key; + + /* private */ function _tmpname($name) + { + return str_replace('{SESSION.NAME}', session_name(), + str_replace('{SESSION.ID}', session_id(), + str_replace('{SESSION.SAVE_PATH}', realpath(ini_get('session.save_path')), + str_replace('{NAME}', $name, + $this->tmpmask + )))); + } + + /* private */ function _test_write_access() + { + $fn = $this->_tmpname('write-test'); + if (!($fp=fopen($fn,"w"))) + throw new Exception("write-test: could not open file for writing: $fn"); + fputs($fp,"TEST123"); + fclose($fp); + + $res = trim(implode('',file($fn))); + if ($res != "TEST123") + throw new Exception("write-test: reading test data failed for file: $fn"); + + unlink($fn); + + return true; + } + + function TexRender_Invoice($param) + { + // test write access and otherwise failed + $this->tmpmask = TEXRENDER_TMP_MASK; + + // should be already cought by the factory, but just to be sure + if ($param{'format'} != 'application/pdf') + throw new Exception("fomat not supported by this renderer: ".$param{'format'}); + + if (!$param{'template'}) + throw new Exception("missing template name"); + + $this->template_name = $param{'template'}; + $this->data = array(); + $this->_test_write_access(); + $this->key = md5(serialize(gettimeofday)); + $this->fn_tex = $this->_tmpname($this->key.'.tex'); + $this->fn_pdf = $this->_tmpname($this->key.'.pdf'); + $this->template_dir= realpath(str_replace('{TEMPLATE-NAME}', $this->template_name,TEXRENDER_TEMPLATE_DIR)); + $this->fn_template_main = $this->template_dir.'/invoice/main.texi'; + $this->fn_template_item = $this->template_dir.'/invoice/item.texi'; + + $inc = $this->template_dir.'/config.php'; + if (!include($inc)) + throw new Exception("could not load config: $inc"); + + if (!is_array($this->config = $tex_template_config)) + throw new Exception("missing template config"); + + if (!$this->config{'lang'}) + throw new Exception("language not set in template config"); + } + + function addData($par) + { + foreach($par as $walk => $cur) + $this->data{$walk} = $cur; + } + + function checkProductItem($item) + { + if (!$item{'name'}) + throw new Exception("missing item name"); + if (!$item{'amount'}) + throw new Exception("missing amount"); + if (!is_numeric($item{'amount'})) + throw new Exception("amount must be numeric"); + if (!$item{'price'}) + throw new Exception("missing price"); + if (!is_numeric($item{'price'})) + throw new Exception("price must be numeric"); + if (($item{'discount'})&&($item{'discount'} != 0)) + throw new Exception("discount not supported yet by this renderer"); + if (!is_numeric($item{'tax_percent'})) + throw new Exception("tax_percent must be numeric"); + } + + function checkData() + { + if ((!is_array($this->_product_items)) || + (!count($this->_product_items))) + throw new Exception("no product items"); + + if (!$this->data{'ident'}) + throw new Exception("missing ident"); + } + + /* public */ function addProductItem($item) + { + // check for correct items + $this->checkProductItem($item); + + // calculate some stuff if necessary + if (!$item{'total'}) + $item{'total'} = $item{'price'} * $item{'amount'}; + if (!$item{'taxes'}) + $item{'taxes'} = $item{'total'} * $item{'tax_percent'}; + if (!$item{'topay'}) + $item{'topay'} = $item{'total'} + $item{'taxes'}; + + $this->_product_items[] = $item; + } + + /* public String */ function getOutputContentType() + { + return 'application/pdf'; + } + + /* private String */ function _generate_tex() + { + if (!($tmpl_main = implode('',file($this->fn_template_main)))) + throw new Exception("could not load main template: ".$this->fn_template_main); + if (!($tmpl_item = implode('',file($this->fn_template_item)))) + throw new Exception("could not load item template: ".$this->fn_template_item); + + // generate the item list + foreach ($this->_product_items as $walk => $cur) + { + $items .= + str_replace('::Item:Name::', $cur{'name'}, + str_replace('::Item:Price::', TexEncode::money($cur{'price'}), + str_replace('::Item:Amount::', $cur{'amount'}, + str_replace('::Item:Taxrate::', $cur{'tax_percent'}, + str_replace('::Item:Description::', $cur{'description'}, + str_replace('::Item:Comment::', trim($cur{'comment'}), + str_replace('::Item:Discount::', TexEncode::money($cur{'discount'}), + str_replace('::Item:Total::', TexEncode::money($cur{'total'}), + str_replace('::Item:Taxes::', TexEncode::money($cur{'taxes'}), + str_replace('::Item:Topay::', TexEncode::money($cur{'topay'}), + $tmpl_item)))))))))); + + $all_total += $cur{'total'}; + $all_taxes += $cur{'taxes'}; + $all_topay += $cur{'topay'}; + } + + $content = + str_replace('::TemplateDir::', $this->template_dir, + str_replace('::Items::', $items, + str_replace('::Bill:Ident::', $this->data{'ident'}, + str_replace('::Bill:Total::', TexEncode::money($all_total), + str_replace('::Bill:Taxes::', TexEncode::money($all_taxes), + str_replace('::Bill:Topay::', TexEncode::money($all_topay), + str_replace('::Company:Addr:Street::', $this->data{'company:addr:street'}, + str_replace('::Company:Addr:PCode::', $this->data{'company:addr:pcode'}, + str_replace('::Company:Addr:City::', $this->data{'company:addr:city'}, + str_replace('::Company:Addr:Country::', $this->data{'company:addr:country'}, + str_replace('::Company:Addr:State::', $this->data{'company:addr:state'}, + str_replace('::Company:Phone::', $this->data{'company:phone'}, + str_replace('::Company:Fax::', $this->data{'company:fax'}, + str_replace('::Company:Website::', $this->data{'company:website'}, + str_replace('::Customer:Name::', $this->data{'customer:name'}, + str_replace('::Customer:Addr:Street::', TexEncode::text($this->data{'billing:addr:street'}), + str_replace('::Customer:Addr:PCode::', TexEncode::text($this->data{'billing:addr:pcode'}), + str_replace('::Customer:Addr:City::', TexEncode::text($this->data{'billing:addr:city'}), + str_replace('::Customer:Addr:State::', TexEncode::text($this->data{'billing:addr:state'}), + str_replace('::Customer:Addr:Country::', TexEncode::text($this->data{'billing:addr:country'}), + $tmpl_main)))))))))))))))))))); + + return $content; + } + + /* public */ function generate() + { + $this->checkData(); + $tex = $this->_generate_tex(); + @unlink($this->fn_tex); + if (!($fp_tex = fopen($this->fn_tex,"w"))) + throw new Exception("could not open tex source file: ".$this->fn_tex); + + fputs($fp_tex,$tex); + fclose($fp_tex); + + $cmd = 'cd '.dirname($this->fn_tex).' && pdflatex '.$this->fn_tex; + `$cmd` ; `$cmd` ; // call it twice for table calculations + } + + // send appropriate http headers and output file + /* public */ function sendHTTPOutput() + { + $this->generate(); + Header("Content-Type: ".$this->getOutputContentType()); + readfile($this->fn_pdf); + } +} -------------- next part -------------- diff -ruN htdocs.orig/modules/Invoice/CreatePDF.php htdocs/modules/Invoice/CreatePDF.php --- htdocs.orig/modules/Invoice/CreatePDF.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Invoice/CreatePDF.php 2007-05-10 15:30:08.000000000 +0200 @@ -9,67 +9,36 @@ * ********************************************************************************/ - -require_once('include/fpdf/pdf.php'); -require_once('include/fpdf/pdfconfig.php'); require_once('modules/Invoice/Invoice.php'); require_once('modules/Organization/Organization.php'); require_once('include/database/PearDatabase.php'); require_once('include/utils/EditViewUtils.php'); +require_once('lib/render/RenderFactory.php'); -global $adb,$app_strings,$focus; -global $log; - -// for template checking ... -$tmpl_dirs = array( "firstpage", "pages", "lastpage"); -$tmpl_files = array( "header.php", "body.php", "footer.php"); +global $adb,$app_strings,$focus,$log; $sql="select currency_symbol from vtiger_currency_info"; $result = $adb->query($sql); $currency_symbol = $adb->query_result($result,0,'currency_symbol'); -// would you like and end page? 1 for yes 0 for no -$endpage="1"; - $id = $_REQUEST['record']; //retreiving the vtiger_invoice info $focus = new Invoice(); $focus->retrieve_entity_info($_REQUEST['record'],"Invoice"); -$account_name = getAccountName($focus->column_fields[account_id]); -$invoice_no = $focus->column_fields[invoice_no]; // **************** BEGIN POPULATE DATA ******************** - -// populate data if($focus->column_fields["salesorder_id"] != '') $so_name = getSoName($focus->column_fields["salesorder_id"]); else $so_name = ''; $po_name = $focus->column_fields["purchaseorder"]; -$valid_till = $focus->column_fields["duedate"]; -$valid_till = getDisplayDate($valid_till); -$bill_street = $focus->column_fields["bill_street"]; -$bill_city = $focus->column_fields["bill_city"]; -$bill_state = $focus->column_fields["bill_state"]; -$bill_code = $focus->column_fields["bill_code"]; -$bill_country = $focus->column_fields["bill_country"]; - -$contact_name =getContactName($focus->column_fields["contact_id"]); -$ship_street = $focus->column_fields["ship_street"]; -$ship_city = $focus->column_fields["ship_city"]; -$ship_state = $focus->column_fields["ship_state"]; -$ship_code = $focus->column_fields["ship_code"]; -$ship_country = $focus->column_fields["ship_country"]; - -$conditions = from_html($focus->column_fields["terms_conditions"]); -$description = from_html($focus->column_fields["description"]); -$status = $focus->column_fields["invoicestatus"]; - // Company information -$crmid = $focus->column_fields["record_id"]; +if (!($crmid = $focus->column_fields["record_id"])) + throw new Exception("crmid is null/empty"); + $org_query = "select organizationname from vtiger_entity2org where crmid='".$crmid."'"; $result = $adb->query($org_query); $org_rows = $adb->num_rows($result); @@ -82,7 +51,7 @@ $org_name = $adb->query_result($result,0,"organizationname"); } else { $log->info( $module. " '".$crmid."' not assigned to any organization"); - exit(); + throw new Exception("crmid $crmid not assigned to any organisation (org_name=$org_name)"); } // get organization/orgunit details @@ -92,68 +61,11 @@ $log->debug( "Here we are: getOrgUnits( $organization, $orgunitid);"); $orgunittab = getOrgUnits( $organization, $orgunitid); -if( is_array( $orgunittab[$orgunitid])) { - $orgdetails = $orgunittab[$orgunitid]; - $org_name = $orgdetails["name"]; - $org_address = $orgdetails["address"]; - $org_city = $orgdetails["city"]; - $org_state = $orgdetails["state"]; - $org_country = $orgdetails["country"]; - $org_code = $orgdetails["code"]; - $org_phone = $orgdetails["phone"]; - $org_fax = $orgdetails["fax"]; - $org_website = $orgdetails["website"]; - $logo_name = $orgdetails["logoname"]; - $template = $orgdetails["invoice_template"]; -} else { - $log->info( $module. " '".$crmid."' organization/orgunitid mismatch"); - exit(); -} - -// Check the template -if( $template == "") - $template = "Default"; - -if( $template != "Default") { - foreach( $tmpl_dirs as $dir) { - foreach( $tmpl_files as $file) { - if( !file_exists( "modules/".$module."/pdf_templates/".$template."/".$dir."/".$file)) { - $log->info( $module. " '".$crmid."' organization/orgunitid template '".$template."' is incomplete"); - $log->info("Missing file: modules/".$module."/pdf_templates/".$template."/".$dir."/".$file); - $log->info("Fallback to the Default template"); - $template = "Default"; - break 2; - } - } - } -} -//NOTE : Removed currency symbols and added with Grand Total text. it is enough to show the currency symbol in one place - -//we can also get the NetTotal, Final Discount Amount/Percent, Adjustment and GrandTotal from the array $associated_products[1]['final_details'] - -//getting the Net Total -$price_subtotal = number_format($focus->column_fields["hdnSubTotal"],2,'.',','); - -//Final discount amount/percentage -$discount_amount = $focus->column_fields["hdnDiscountAmount"]; -$discount_percent = $focus->column_fields["hdnDiscountPercent"]; - -if($discount_amount != "") - $price_discount = number_format($discount_amount,2,'.',','); -else if($discount_percent != "") -{ - //This will be displayed near Discount label - used in include/fpdf/templates/body.php - $final_price_discount_percent = "(".number_format($discount_percent,2,'.',',')." %)"; - $price_discount = number_format((($discount_percent*$focus->column_fields["hdnSubTotal"])/100),2,'.',','); -} -else - $price_discount = "0.00"; - -//Adjustment -$price_adjustment = number_format($focus->column_fields["txtAdjustment"],2,'.',','); -//Grand Total -$price_total = number_format($focus->column_fields["hdnGrandTotal"],2,'.',','); +if(!is_array( $orgunittab[$orgunitid])) + throw new Exception("org/orgunitid mismatch"); +$orgdetails = $orgunittab[$orgunitid]; +$template = $orgdetails["invoice_template"]; //get the Associated Products for this Invoice $focus->id = $focus->column_fields["record_id"]; @@ -166,6 +78,8 @@ //To calculate the group tax amount if($final_details['taxtype'] == 'group') { + throw new Exception("group tax not supported"); + $group_tax_total = $final_details['tax_totalamount']; $price_salestax = number_format($group_tax_total,2,'.',','); @@ -191,47 +105,37 @@ $sh_tax_amount = $final_details['shtax_totalamount']; $price_shipping_tax = number_format($sh_tax_amount,2,'.',','); +$render = RenderFactory::getRenderer_Invoice(array +( + format => 'application/pdf', + engine => 'pdflatex', + template => 'default' +)); //This is to get all prodcut details as row basis -for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++) +for($i=1;$i<=$num_products;$i++) { - $product_name[$i] = $associated_products[$i]['productName'.$i]; - $prod_description[$i] = $associated_products[$i]['productDescription'.$i]; - $product_id[$i] = $associated_products[$i]['hdnProductId'.$i]; - $qty[$i] = $associated_products[$i]['qty'.$i]; - $unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',','); - $list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',','); - $list_pricet[$i] = $associated_products[$i]['listPrice'.$i]; - $discount_total[$i] = $associated_products[$i]['discountTotal'.$i]; - //aded for 5.0.3 pdf changes - $product_code[$i] = $associated_products[$i]['hdnProductcode'.$i]; - - $taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i]; - - $producttotal = $taxable_total; - $total_taxes = '0.00'; if($focus->column_fields["hdnTaxType"] == "individual") { - $total_tax_percent = '0.00'; - //This loop is to get all tax percentage and then calculate the total of all taxes - for($tax_count=0;$tax_countaddProductItem(array + ( + code => $associated_products[$i]['hdnProductcode'.$i], + name => $associated_products[$i]['productName'.$i], + amount => $associated_products[$i]['qty'.$i], + price => $associated_products[$i]['listPrice'.$i], + unit_price => $associated_products[$i]['unitPrice'.$i], + discount => $associated_products[$i]['discountTotal'.$i], + tax_percent => (integer)($tax_percent)/100, + description => $associated_products[$i]['productDescription'.$i], + comment => $associated_products[$i]['comment'.$i] + )); // Product piecelists $query = "SELECT vtiger_crmentity.crmid, @@ -245,86 +149,46 @@ INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid WHERE vtiger_crmentity.deleted = 0 - AND vtiger_products2products_rel.productid = ".$product_id[$i]." + AND vtiger_products2products_rel.productid = ".$product_id." AND vtiger_products2products_rel.relation_type = 10"; $result = $adb->query($query); $pieces = $adb->num_rows($result); if( $pieces > 0) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = "consisting of:"; - $product_line[$j]["Qty"] = ""; - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - for( $pl=0; $pl<$pieces; $pl++) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = - $adb->query_result( $result, $pl, "productname"); - $product_line[$j]["Qty"] = - $adb->query_result( $result, $pl, "quantity"); - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - } + throw new Exception("multiple pieces not yet supported !"); } } -//echo '
Product Details ==>';print_r($product_line);echo '
'; -//echo '
';print_r($associated_products);echo '
'; - // ************************ END POPULATE DATA ***************************8 -$page_num='1'; -$pdf = new PDF( 'P', 'mm', 'A4' ); -$pdf->Open(); - -$num_pages=ceil(count($product_line)/$products_per_page); - - -$current_product=0; -for($l=0;$l<$num_pages;$l++) -{ - $line=array(); - if($num_pages == $page_num) - $lastpage=1; - - while($current_product != $page_num*$products_per_page) - { - $line[]=$product_line[$current_product]; - $current_product++; - } - - //if bottom > 145 then we skip the Description and T&C in every - //page and display only in lastpage - //if you want to display the description and T&C in each page then - //set the display_desc_tc='true' and bottom <= 145 in pdfconfig.php - $pdf->AddPage(); - if( $page_num == "1") { - include("pdf_templates/".$template."/firstpage/header.php"); - include("pdf_templates/".$template."/firstpage/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/firstpage/footer.php"); - } else { - include("pdf_templates/".$template."/pages/header.php"); - include("pdf_templates/".$template."/pages/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/pages/footer.php"); - } - - $page_num++; - - if (($endpage) && ($lastpage)) - { - $pdf->AddPage(); - include("pdf_templates/".$template."/lastpage/header.php"); - include("pdf_templates/".$template."/lastpage/body.php"); - include("pdf_templates/".$template."/lastpage/footer.php"); - } -} - - -$pdf->Output('Invoice-'.$crmid.'.pdf','D'); //added file name to make it work in IE, also forces the download giving the user the option to save +$render->addData(array +( + 'valid_until' => $focus->column_fields["duedate"], + 'description' => from_html($focus->column_fields["description"]), + 'conditions' => from_html($focus->column_fields["terms_conditions"]), + 'tax_type' => $focus->column_fields['hdnTaxType'], + 'ident' => $focus->column_fields['invoice_no'], + 'contact:name' => getContactName($focus->column_fields["contact_id"]), + 'company:name' => $orgdetails["name"], + 'company:addr:city' => $orgdetails["city"], + 'company:addr:pcode' => $orgdetails["code"], + 'company:addr:street' => $orgdetails["address"], + 'company:addr:country' => $orgdetails["country"], + 'company:addr:state' => $orgdetails["state"], + 'company:phone' => $orgdetails["phone"], + 'company:fax' => $orgdetails["fax"], + 'company:website' => $orgdetails["website"], + 'customer:name' => getAccountName($focus->column_fields[account_id]), + 'shipping:addr:city' => $focus->column_fields["ship_city"], + 'shipping:addr:pcode' => $focus->column_fields["ship_code"], + 'shipping:addr:street' => $focus->column_fields["ship_street"], + 'shipping:addr:country' => $ship_country = $focus->column_fields["ship_country"], + 'shipping:addr:state' => $focus->column_fields["ship_state"], + 'billing:addr:city' => $focus->column_fields["bill_city"], + 'billing:addr:pcode' => $focus->column_fields["bill_code"], + 'billing:addr:street' => $focus->column_fields["bill_street"], + 'billing:addr:country' => $focus->column_fields["bill_country"], + 'billing:addr:state' => $focus->column_fields["bill_state"] +)); -// Added to fix annoying bug that includes HTML in your PDF +$render->sendHTTPOutput(); exit(); -?> -------------- next part -------------- diff -ruN htdocs.orig/templates/tex/default/config.php htdocs/templates/tex/default/config.php --- htdocs.orig/templates/tex/default/config.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/config.php 2007-05-09 20:00:54.000000000 +0200 @@ -0,0 +1,7 @@ + 'de', + 'tex2pdf' => 'pdflatex' +); diff -ruN htdocs.orig/templates/tex/default/invoice/item.texi htdocs/templates/tex/default/invoice/item.texi --- htdocs.orig/templates/tex/default/invoice/item.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/item.texi 2007-05-10 14:25:30.000000000 +0200 @@ -0,0 +1,2 @@ +::Item:Name:: \ifempty{::Item:Comment::}{}{(::Item:Comment::)} & ::Item:Price:: \Euro & ::Item:Amount:: & ::Item:Total:: \Euro \\ +\hline diff -ruN htdocs.orig/templates/tex/default/invoice/main.texi htdocs/templates/tex/default/invoice/main.texi --- htdocs.orig/templates/tex/default/invoice/main.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/main.texi 2007-05-10 14:15:53.000000000 +0200 @@ -0,0 +1,53 @@ +\def\ResourcePrefix{::TemplateDir::/resource} +\input \ResourcePrefix/bill.tex + +\def\ifempty#1#2#3{\def\inner{#1}\ifx\inner\empty + #2\else #3\fi } + +\begin{document} + \letterInit + \begin{letter}{% + ::Customer:Addr:Street:: \ \\ + ::Customer:Addr:PCode::\ ::Customer:Addr:City:: \ \\ + \ \\[\medskipamount] + } + + \opening{\Large Ihre Rechnung:\normalsize~~~ ::Bill:Ident:: +%% ~~~~~~~~~~vom:~~::BillDate:: + } + + \setlength\LTleft{0pt} + \setlength\LTright{72pt} + \begin{longtable}{|p{300pt}|r|r|r|} + \hline + Leistung & Preis & Menge & Summe \\ + \hline + \endhead + \hline + \hline + \multicolumn{3}{|l|}{Rechnungsbetrag} & ::Bill:Total:: \Euro \\ + \hline + \multicolumn{3}{|l|}{Umsatzsteuer} & ::Bill:Taxes:: \Euro \\ + \hline + \hline + \multicolumn{3}{|l|}{Gesamt} & ::Bill:Topay:: \Euro \\ + \hline + \noalign{ + \vspace{12pt} + \small + Soweit nicht anders angegeben entspricht das Lieferdatum + dem Rechnungsdatum + } + \noalign{ + \vspace{12pt} + \normalsize + Bitte {\"u}berweisen Sie den f{\"a}lligen Betrag binnen + 10~Tagen auf eines unserer Konten. \newline + Die Ware bleibt bis zur vollst{\"a}ndigen Bezahlung Eigentum + von metux IT service. + } + \endlastfoot + ::Items:: + \end{longtable} + \end{letter} +\end{document} diff -ruN htdocs.orig/templates/tex/default/resource/bill.tex htdocs/templates/tex/default/resource/bill.tex --- htdocs.orig/templates/tex/default/resource/bill.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/bill.tex 2007-05-09 23:55:35.000000000 +0200 @@ -0,0 +1,22 @@ +\input{\ResourcePrefix/metux.tex} + +\documentclass[a4paper,bottom=0cm,fromalign=center,fromlogo=true]{scrlttr2} +\usepackage{epsfig} +\usepackage{longtable} + +\usepackage{ngerman} +\usepackage[latin1]{inputenc} +%usepackage{fancyhdr} +%pagestyle{fancy} + +% brief-init +\newcommand\letterInit{% + \captionsgerman + \dategerman + \firsthead{\metuxHeader} + \firstfoot{\metuxFooter} + \setkomavar{fromname}{metux IT service} + \setkomavar{fromaddress}{Heydaer Stra{\ss}e 23, 99338 Plaue} +} + +\newcommand\Euro{Euro} diff -ruN htdocs.orig/templates/tex/default/resource/header.eps htdocs/templates/tex/default/resource/header.eps --- htdocs.orig/templates/tex/default/resource/header.eps 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.eps 2002-09-17 01:45:21.000000000 +0200 @@ -0,0 +1,178 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: header.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3d +%%CreationDate: Tue Jul 30 18:35:09 2002 +%%For: ems at nibiru.metux.de () +%%BoundingBox: 0 0 643 88 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 88 moveto 0 0 lineto 643 0 lineto 643 88 lineto closepath clip newpath +-4.5 96.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/reencdict 12 dict def /ReEncode { reencdict begin +/newcodesandnames exch def /newfontname exch def /basefontname exch def +/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def +basefontdict { exch dup /FID ne { dup /Encoding eq +{ exch dup length array copy newfont 3 1 roll put } +{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall +newfont /FontName newfontname put newcodesandnames aload pop +128 1 255 { newfont /Encoding get exch /.notdef put } for +newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat +newfontname newfont definefont pop end } def +/isovec [ +8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde +8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis +8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron +8#220 /dotlessi 8#230 /oe 8#231 /OE +8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling +8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis +8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot +8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus +8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph +8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine +8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf +8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute +8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring +8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute +8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute +8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve +8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply +8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex +8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave +8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring +8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute +8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute +8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve +8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide +8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex +8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def +/Courier-Bold /Courier-Bold-iso isovec ReEncode +/Times-Bold /Times-Bold-iso isovec ReEncode +/Times-Roman /Times-Roman-iso isovec ReEncode +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +/Times-Roman-iso ff 150.00 scf sf +6600 1200 m +gs 1 -1 sc (www.metux.de) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 825 m +gs 1 -1 sc (+49 36207 51833) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 675 m +gs 1 -1 sc (+49 174 7066481) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 1350 m +gs 1 -1 sc (contact @ metux.de) col8 sh gr +/Courier-Bold-iso ff 180.00 scf sf +1650 750 m +gs 1 -1 sc (Ihr innovativer IT-Dienstleister) col25 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 1200 m +gs 1 -1 sc ( Internet) col0 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 675 m +gs 1 -1 sc ( Telephon) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1350 m +gs 1 -1 sc (Advance Bank \(BLZ 702 300 00\), Kto-Nr: 200 72 64 206) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1575 m +gs 1 -1 sc (Enrico Weigelt, Steuer-Nr: 154/286/05931) col8 sh gr +/Times-Bold-iso ff 300.00 scf sf +75 750 m +gs 1 -1 sc (metux ITS) col9 sh gr +/Courier-Bold-iso ff 150.00 scf sf +150 1350 m +gs 1 -1 sc (Bankverbindung:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +750 1575 m +gs 1 -1 sc (Inhaber:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +225 1125 m +gs 1 -1 sc (Hausanschrift:) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1125 m +gs 1 -1 sc (Heydaer Strasse 23 99338 Plaue) col8 sh gr +/Times-Roman-iso ff 180.00 scf sf +10125 300 m +gs 1 -1 sc (tricktext) col0 sh gr +$F2psEnd +rs diff -ruN htdocs.orig/templates/tex/default/resource/header.fig htdocs/templates/tex/default/resource/header.fig --- htdocs.orig/templates/tex/default/resource/header.fig 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.fig 2002-09-17 01:44:26.000000000 +0200 @@ -0,0 +1,24 @@ +#FIG 3.2 +Landscape +Center +Inches +A4 +100.00 +Single +-2 +1200 2 +4 0 0 893 -1 14 10 -0.0000 4 135 1350 150 1350 Bankverbindung:\001 +4 0 0 890 -1 14 10 -0.0000 4 105 1260 225 1125 Hausanschrift:\001 +4 0 9 918 -1 2 20 0.0000 4 150 1005 75 750 metux ITS\001 +4 0 25 969 -1 14 12 -0.0000 4 135 3360 1650 750 Ihr innovativer IT-Dienstleister\001 +4 0 0 942 -1 2 10 0.0000 4 135 750 5700 675 Telephon\001 +4 0 8 991 -1 0 10 0.0000 4 105 1050 6600 675 +49 174 7066481\001 +4 0 8 997 -1 0 10 0.0000 4 105 1050 6600 825 +49 36207 51833\001 +4 0 8 999 -1 0 10 0.0000 4 105 990 6600 1200 www.metux.de\001 +4 0 0 946 -1 2 10 0.0000 4 105 765 5700 1200 Internet\001 +4 0 8 888 -1 0 10 0.0000 4 135 1935 1650 1125 Heydaer Strasse 23 99338 Plaue\001 +4 0 8 987 -1 0 10 0.0000 4 135 1230 6600 1350 contact @ metux.de\001 +4 0 8 933 -1 0 10 0.0000 4 135 3435 1650 1350 Advance Bank (BLZ 702 300 00), Kto-Nr: 200 72 64 206\001 +4 0 0 50 0 0 12 0.0000 4 135 645 10125 300 tricktext\001 +4 0 0 893 -1 14 10 0.0000 4 105 720 750 1575 Inhaber:\001 +4 0 8 933 -1 0 10 0.0000 4 135 2415 1650 1575 Enrico Weigelt, Steuer-Nr: 154/286/05931\001 diff -ruN htdocs.orig/templates/tex/default/resource/metux.tex htdocs/templates/tex/default/resource/metux.tex --- htdocs.orig/templates/tex/default/resource/metux.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/metux.tex 2007-05-09 23:56:59.000000000 +0200 @@ -0,0 +1,76 @@ +% Variablen .... % +\def\metuxSignature{\epsfig{file=\ResourcePrefix/signature.png}} +\def\metuxName{metux IT service} +\def\metuxPhone{+49-36207-519931} +\def\metuxFax{+49-36207-519932} +\def\metuxEmail{weigelt at metux.de} +\def\metuxUrl{www.metux.de} +\def\metuxAddress{Heydaer Stra{\ss}e 23, 99338 Plaue} +\def\metuxBankAccount{0972596900} +\def\metuxBankCompany{Dresdner Bank AG} +\def\metuxBankCode{82080000} +\def\metuxBank{Kto: \metuxBankAccount, BLZ: \metuxBankCode, \metuxBankCompany} +\def\metuxStrnr{154/286/05931} +\def\metuxOwner{Enrico Weigelt} + +\def\nl{\ \\} +\def\metuxGeomLeft{2cm} +\def\metuxGeomRight{2cm} +\def\metuxGeomBottom{1cm} +\def\metuxGeomHead{1cm} +\def\metuxGeomTop{0.5cm} + +\newcommand\metuxFooter +{ + \hrule + ~\newline + \parbox[l]{180pt}{ + \small + \metuxName \\ + Inh. \metuxOwner \\ + \metuxAddress \\ + StNr: \metuxStrnr + } + \parbox[l]{180pt}{ + \small + Bankverbindung: \\ + Kto: \metuxBankAccount \\ + BLZ: \metuxBankCode \\ + \metuxBankCompany + } + \parbox[l]{180pt}{ + \small + Tel: \metuxPhone \\ + Fax: \metuxFax \\ + eMail: \metuxEmail \\ + WWW: \metuxUrl + } +} + +\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.png}} +%\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.eps}} +\newcommand\metuxInit{ + \renewcommand{\headrulewidth}{0.5pt} + \renewcommand{\footrulewidth}{0.5pt} + \cfoot{\metuxFooter} + \chead{\metuxHeader} +} + +% \newcommand\Euro{Euro} + +\def\metuxMFG{% + \noindent Mit freundlichem Gru\ss + + \epsfig{\metuxSignature} + + \noindent Enrico Weigelt \\ + metux IT service +} + +\def\metuxMFGpriv{% + \noindent Mit freundlichem Gru\ss + + \metuxSignature + + \noindent Enrico Weigelt +} From amvandemore at gmail.com Thu May 10 15:59:44 2007 From: amvandemore at gmail.com (Adam Vande More) Date: Thu, 10 May 2007 14:59:44 -0500 Subject: [Vtigercrm-developers] Custom Integration with website Message-ID: <6201873e0705101259w1eb599d0xd5fcbb0916cb546c@mail.gmail.com> I have written our contact us page to insert the customer's information directly into vtiger as a lead. I am aware that the webforms add on does the same thing but I elected to write my own script. The script inserts data into tables: vtiger_crmentity vtiger_leaddetails vtiger_leadaddress vtiger_leadscf vtiger_leadsubdetails vtiger_crmentity_seq - increments the value In testing this appears to work just fine, however it occurs to me that I may have missed some possible constraints in the db that could result in data integrity issues if i didn't do this correctly. Are there any other tables that should be updated or any other areas I should be worried about? Also the webforms source seems exceedingly complex for a relatively simple task and it's too abstracted for me to be able to read easily. I'm not sure if it's doing checks that I should implement too. Does anyone have any insight into this? -- Adam Vande More Systems Administrator Mobility Sales -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/6318a0f8/attachment-0004.html From weigelt at metux.de Thu May 10 20:13:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 02:13:35 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() Message-ID: <20070511001335.GA5640@nibiru.local> Hi folks, as we sometimes get some errors like: # Fatal error: Call to a member function Move() on a non-object # in .../include/database/PearDatabase.php on line 443 Obviously sometimes the query_result() method is called with an non-existing result object. This patch adds an check which throws an exception on missing result object, so we can easily track it down. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 @@ -438,6 +438,8 @@ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); + if (!is_object($result)) + throw new Exception("result is not an object"); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); From jorge.torres.maldonado at gmail.com Thu May 10 20:31:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Thu, 10 May 2007 20:31:24 -0400 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <530c7d700705101731q8704acw53e1e2f0e7bfc03f@mail.gmail.com> THis one I like, thank you very much On 5/10/07, Enrico Weigelt wrote: > > > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/152bcf4f/attachment-0002.html From weigelt at metux.de Thu May 10 21:13:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:13:10 +0200 Subject: [Vtigercrm-developers] [PATCH] some new $adb (PearDatabase) methods Message-ID: <20070511011310.GA19509@nibiru.local> Hi folks, this patch adds two new functions to the PearDatabase ($adb) class: * sql_concat(array): generates an sql expression for field concatenations, based on selected RDBMS. * run_query_field(string): executes an given SQL query and returns only the first field of the first record. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-11 02:17:06.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 02:55:29.000000000 +0200 @@ -434,6 +434,31 @@ return $this->change_key_case($result->FetchRow()); } + function sql_concat($list) + { + switch ($this->dbType) + { + case 'mysql': + return 'concat('.implode(',',$list).')'; + case 'pgsql': + return '('.implode('||',$list).')'; + default: + throw new Exception("unsupported dbtype \"".$this->dbType."\""); + } + } + + function run_query_field($sql) + { + $this->checkConnection(); + $result = $this->database->Execute($sql); + + if (!is_object($result)) + throw new Exception("query failed: $sql"); + + $row = $result->FetchRow(); + return array_shift($row); + } + /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { From weigelt at metux.de Thu May 10 21:32:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:32:07 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) Message-ID: <20070511013207.GB19509@nibiru.local> Hi folks, the leads module (Tracker.php) suffers from an sql bug: it uses mysql specific sql statements for concatenating fields. This ends up in empty result objects and so the already mentioned error of trying to call Move() on non-object. This patch solves this by using the new PearDatabas::sql_concat() function (see prev. patch) for creating the statement. Also this patch calls the new PearDatabase::run_query_field() for the one-field-query. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 @@ -80,18 +80,23 @@ $entityidfield = $adb->query_result($result,0,'entityidfield'); if(!(strpos($fieldsname,',') === false)) { - $fieldlists = explode(',',$fieldsname); - $fieldsname = "concat("; - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); - $fieldsname = $fieldsname.")"; + // concatenate multiple fields with an whitespace between them + $fieldlists = explode(',',$fieldsname); + $fl = array(); + foreach($fieldlists as $w => $c) + { + if (count($fl)) + $fl[] = "' '"; + $fl[] = $c; + } + $fieldsname = $adb->sql_concat($fl); } if($current_module =='Organization') { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; } else { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; } - $result = $adb->query($query1); - $item_summary = $adb->query_result($result,0,'entityname'); + $item_summary = $adb->run_query_field($query1); } ### Check database item sizes From jens at Strawberry.COM Fri May 11 03:36:01 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 09:36:01 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) In-Reply-To: <20070511013207.GB19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 03:32:07AM +0200 References: <20070511013207.GB19509@nibiru.local> Message-ID: <20070511093601.A14681@Strawberry.COM> Hi, my Postgres patches already introduced a stored procedure which handles concats in Postgres. This is IMHO mor performant. Jens On Fri, May 11, 2007 at 03:32:07AM +0200, Enrico Weigelt wrote: > > Hi folks, > > > the leads module (Tracker.php) suffers from an sql bug: it uses > mysql specific sql statements for concatenating fields. This ends > up in empty result objects and so the already mentioned error > of trying to call Move() on non-object. > > This patch solves this by using the new PearDatabas::sql_concat() > function (see prev. patch) for creating the statement. > > Also this patch calls the new PearDatabase::run_query_field() > for the one-field-query. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php > --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 > @@ -80,18 +80,23 @@ > $entityidfield = $adb->query_result($result,0,'entityidfield'); > if(!(strpos($fieldsname,',') === false)) > { > - $fieldlists = explode(',',$fieldsname); > - $fieldsname = "concat("; > - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); > - $fieldsname = $fieldsname.")"; > + // concatenate multiple fields with an whitespace between them > + $fieldlists = explode(',',$fieldsname); > + $fl = array(); > + foreach($fieldlists as $w => $c) > + { > + if (count($fl)) > + $fl[] = "' '"; > + $fl[] = $c; > + } > + $fieldsname = $adb->sql_concat($fl); > } > if($current_module =='Organization') { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; > } else { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; > } > - $result = $adb->query($query1); > - $item_summary = $adb->query_result($result,0,'entityname'); > + $item_summary = $adb->run_query_field($query1); > } > > ### Check database item sizes > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From philip at vtiger.com Fri May 11 06:29:36 2007 From: philip at vtiger.com (Philip) Date: Fri, 11 May 2007 15:59:36 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <46444590.1040501@vtiger.com> Hi Enrico, When tested the code i had the following exception thrown in the screen. *Fatal error*: Uncaught exception 'Exception' with message 'given result set is not an object' in /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 Stack trace: #0 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): PearDatabase->query_result(false, 0, 'count') #1 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): include('/home/crm-test3...') #2 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): require_once('/home/crm-test3...') #3 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): require_once('/home/crm-test3...') #4 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): include('/home/crm-test3...') #5 {main} thrown in */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* on line *442 *So where should i catch this exception. Regards, Philip Enrico Weigelt wrote: > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > > ------------------------------------------------------------------------ > > diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php > --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 > @@ -438,6 +438,8 @@ > function query_result(&$result, $row, $col=0) > { > //$this->println("ADODB query_result r=".$row." c=".$col); > + if (!is_object($result)) > + throw new Exception("result is not an object"); > $result->Move($row); > $rowdata = $this->change_key_case($result->FetchRow()); > //$this->println($rowdata); > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Fri May 11 09:57:17 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 15:57:17 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <46444590.1040501@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> Message-ID: <20070511135717.GD19509@nibiru.local> * Philip schrieb: Hi, > When tested the code i had the following exception thrown in the screen. > > *Fatal error*: Uncaught exception 'Exception' with message 'given result > set is not an object' in > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 > Stack trace: #0 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): > PearDatabase->query_result(false, 0, 'count') #1 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): > include('/home/crm-test3...') #2 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): > require_once('/home/crm-test3...') #3 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): > require_once('/home/crm-test3...') #4 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): > include('/home/crm-test3...') #5 {main} thrown in > */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* > on line *442 Looks like an bug in Potentials/ListView.php. Probably an query failed and so $result is empty. We've lots of such issues everywhere :( cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:38:26 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:38:26 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers Message-ID: <20070511143826.GF19509@nibiru.local> Hi folks, is it possible (by the db schema) to change invoice numbers ? I don't like the automatic numbering very much and like to change the numbers. I suspect similar trouble as w/ the org/company name ;-O cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:46:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:46:44 +0200 Subject: [Vtigercrm-developers] Sending invoice via email Message-ID: <20070511144644.GG19509@nibiru.local> Hi folks, I'm looking for an function to send invoices automatically via eMail. Is there already such an function or should I implement it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 10:57:14 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:57:14 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" Message-ID: <20070511145714.GH19509@nibiru.local> Hi folks, could anyone please explain what the invoice status "credited invoice" actually means ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Fri May 11 11:03:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:03:35 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511143826.GF19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:38:26PM +0200 References: <20070511143826.GF19509@nibiru.local> Message-ID: <20070511170335.A16456@Strawberry.COM> Hi, originally the invoice number was just the CRMEntity ID. As it is for any other entity like quotes, so, ... But: hasn't there been a recent change on that (just invoices)? What about a generic solution to that issue, too? I was already thinking about introducing "ranges of numbers", a table that defines the format of particular numbers, like invoice-numbers, product-numbers etc. Especially for invoices we need some automatism. Some govern- ments - Germany !!! - forces companies to provide an determi- nistic numbering scheme for invoices. So this field cannot be assigned manually to each invoice. jens On Fri, May 11, 2007 at 04:38:26PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > is it possible (by the db schema) to change invoice numbers ? > > I don't like the automatic numbering very much and like to change > the numbers. > > I suspect similar trouble as w/ the org/company name ;-O > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Fri May 11 11:07:02 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:07:02 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511145714.GH19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:57:14PM +0200 References: <20070511145714.GH19509@nibiru.local> Message-ID: <20070511170702.C16456@Strawberry.COM> Eine Stundung? On Fri, May 11, 2007 at 04:57:14PM +0200, Enrico Weigelt wrote: > > Hi folks, > > could anyone please explain what the invoice status > "credited invoice" actually means ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Fri May 11 11:22:25 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:22:25 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511170335.A16456@Strawberry.COM> References: <20070511143826.GF19509@nibiru.local> <20070511170335.A16456@Strawberry.COM> Message-ID: <20070511152225.GI19509@nibiru.local> * Jens Hamisch schrieb: Hi, > originally the invoice number was just the CRMEntity ID. > As it is for any other entity like quotes, so, ... > But: hasn't there been a recent change on that (just invoices)? Ah, I see: The invoice ID is actually an pointer for schema internal references. And that's the source of the problem: internal references should always base on internal object IDs, never on user- visible idents/names. > What about a generic solution to that issue, too? > I was already thinking about introducing "ranges of numbers", > a table that defines the format of particular numbers, like > invoice-numbers, product-numbers etc. Ugh, no. Not for the object references. For such things we have sequences, which produce OIDs (which are in fact just unique numbers). Many things which an user would call "number" are names, not numbers. So ie. for invoice numbers: they're not object ID's, but names. Of course names, which follow certain rules, ie. for automatic allocation, but from the schema's view they're just opaque names, strings, text. > Especially for invoices we need some automatism. Some govern- > ments - Germany !!! - forces companies to provide an determi- > nistic numbering scheme for invoices. So this field cannot be > assigned manually to each invoice. Leave this to the user/admin. It should be clear that the "invoice_no" field cannot be an object id. So the first step is to introduce an separate oid field (fed by some sequence) and let *all* references point on that field. From now on let's call the old invoice_no field an invoice ident. The second step is to implement an customizable scheme for autmatic invoice ident allocation. Maybe put this into an separate class, which can be easily adoped to user's needs. Whether some crm user should be allowed to change the invoice idents is just an permission issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 11:24:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:24:50 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511170702.C16456@Strawberry.COM> References: <20070511145714.GH19509@nibiru.local> <20070511170702.C16456@Strawberry.COM> Message-ID: <20070511152450.GJ19509@nibiru.local> * Jens Hamisch schrieb: switching this thread to german: > Eine Stundung? Ok. Man kann Rechnungen nur komplett stunden ? F?r Ratenzahlung, etc haben wir noch kein Handling ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From fp at crm-now.de Fri May 11 12:27:42 2007 From: fp at crm-now.de (Frank Piepiorra) Date: Fri, 11 May 2007 18:27:42 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: Message-ID: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Enrico, any chance that you post your contribution as files at vtigerForge? Regards, Frank From weigelt at metux.de Fri May 11 14:11:59 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:11:59 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> References: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Message-ID: <20070511181159.GA25485@nibiru.local> * Frank Piepiorra schrieb: Hi, > any chance that you post your contribution as files at vtigerForge? any chance for doing this per command line ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- From gopals at vtiger.com Fri May 11 14:34:35 2007 From: gopals at vtiger.com (Gopal) Date: Sat, 12 May 2007 00:04:35 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511135717.GD19509@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> Message-ID: <4644B73B.70005@vtiger.com> Hi Enrico, Thanks for your suggestions to take vtiger to next level. Please don't hesitate to highlight issues (if any) in various places. In fact Philip has tried to integrate your patch with our 5.0.3 release. However, he is unsuccessful. It will be of great help, if you could spend your valuable time on our forthcoming 5.0.3 release. I am confident, with our community support we can release a better product. Best Regards, Gopal (vtiger Team) Enrico Weigelt wrote: > * Philip schrieb: > > Hi, > > >> When tested the code i had the following exception thrown in the screen. >> >> *Fatal error*: Uncaught exception 'Exception' with message 'given result >> set is not an object' in >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 >> Stack trace: #0 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): >> PearDatabase->query_result(false, 0, 'count') #1 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): >> include('/home/crm-test3...') #2 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): >> require_once('/home/crm-test3...') #3 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): >> require_once('/home/crm-test3...') #4 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): >> include('/home/crm-test3...') #5 {main} thrown in >> */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* >> on line *442 >> > > Looks like an bug in Potentials/ListView.php. > Probably an query failed and so $result is empty. > > We've lots of such issues everywhere :( > > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070512/b5575516/attachment-0002.html From weigelt at metux.de Fri May 11 14:55:11 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:55:11 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <4644B73B.70005@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> Message-ID: <20070511185511.GB25485@nibiru.local> * Gopal schrieb: Hi, > In fact Philip has tried to integrate your patch with our 5.0.3 > release. However, he is unsuccessful. It will be of great help, if you > could spend your valuable time on our forthcoming 5.0.3 release. I'm entirely working on Jens's 5.1 branch, since I need postgres. IMHO we first should get 5.0.3 and 5.1_jens merged. My patches are divided into two groups: *jens*.diff -> the changes from 5.1_jens to jens' personal tree *nekrad*.diff -> my own changes based on jens' tree. Maybe, in some cases the ordering could be significant (although it *should* not ;-O) Some of my patches *might* also work on 5.0.3, but I didn't check. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From philip at vtiger.com Mon May 14 02:20:29 2007 From: philip at vtiger.com (Philip) Date: Mon, 14 May 2007 11:50:29 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511185511.GB25485@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> <20070511185511.GB25485@nibiru.local> Message-ID: <4647FFAD.3020804@vtiger.com> Hi Enrico, Regarding the patch, to overcome the empty result error you have given the throw exception, function but whenever we use throw exception, we need to use catch function, because of this i got uncaught exception during the patch integration. Does the patch works fine with out caught function in your setup? if not where do we need to include this catch function? Any help would be highly appreciated. Regards, Philip Enrico Weigelt wrote: > * Gopal schrieb: > > Hi, > > >> In fact Philip has tried to integrate your patch with our 5.0.3 >> release. However, he is unsuccessful. It will be of great help, if you >> could spend your valuable time on our forthcoming 5.0.3 release. >> > > I'm entirely working on Jens's 5.1 branch, since I need postgres. > IMHO we first should get 5.0.3 and 5.1_jens merged. > > My patches are divided into two groups: > > *jens*.diff -> the changes from 5.1_jens to jens' personal tree > *nekrad*.diff -> my own changes based on jens' tree. > > Maybe, in some cases the ordering could be significant > (although it *should* not ;-O) > > > Some of my patches *might* also work on 5.0.3, but I didn't check. > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070514/4c27c9ee/attachment-0004.html From anugupta at pu.ac.in Mon May 14 04:59:42 2007 From: anugupta at pu.ac.in (Anu Gupta DCSA) Date: Mon, 14 May 2007 15:29:42 +0630 Subject: [Vtigercrm-developers] A Survey on Defect Management Practices in Free/Open Source Software Message-ID: <20070514085932.M82540@pu.ac.in> Sir/Madam I seek help from designers, developers, testers,defect fixers,project managers or playing any other key role in Free/Open Source software development or maintenence in carrying out a study on practices and problems of defect management in various Free/Open Source Software projects. The insights gained from the study can further help us to extract publicly accessible defect data and determine impact of defect management practices on software quality. Please spend a few minutes of your precious time to fill up the Questionnaire. The most of the questions follow multiple choice formats and are quite easy to answer. To have the Online Questionnaire, please visit: http://anu.puchd.ac.in/phpESP/public/survey.php?name=FOSS_Defect_Survey (You can also copy and paste this link into your browser, and hit the 'Return' key.) I hope you will find all the questions interesting and thought-provoking. Your answers will be kept anonymous.The data thus collected will only be used for research purpose.It would be nice if you may further refer this mail to others actively engaged with Free/Open Source Software development. If you have any query or suggestions then feel free to contact. Thank You With regards, Anu Gupta Senior Lecturer Department of Computer Science and Applications, Panjab University, Chandigarh. INDIA In case of any problem in accessing/using the above mentioned link please contact: E-mail: anugupta at pu.ac.in anugupta98 at gmail.com From joe at tsolucio.com Tue May 15 19:56:04 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 16 May 2007 01:56:04 +0200 Subject: [Vtigercrm-developers] Custom Invoice Number Message-ID: <464A4894.1060001@tsolucio.com> Hi, I have just looked at this code. I believe that this is not the correct way to solve the autoincrement problem Perfectioning the code that already exists in forum/wiki for this you would have had a more complete solution that would serve any module. Instead you have whipped up your own solution which is probably not multi-user safe, you have hardcoded english text into a checkduplicate function which would not be necessary if you were using the database which is already transaction and multiuser safe and you are writing php files with code each time an invoice is made. Have you at all thought about 4-5 people making invoices at a time? Why are you still hardcoding strings in the code? Why not trust the database to avoid overlapping? I mean the database guys have solved this problem a long time ago, who are we to invent a new untested system? As normal you leave aside the community. I know I am becomming a persona non grata here, but somebody has to say these things. If you keep in this line this product is doomed. Joe TSolucio From davidv.net at gmail.com Wed May 16 09:09:47 2007 From: davidv.net at gmail.com (David V.) Date: Wed, 16 May 2007 09:09:47 -0400 Subject: [Vtigercrm-developers] Custom Invoice Number In-Reply-To: <464A4894.1060001@tsolucio.com> References: <464A4894.1060001@tsolucio.com> Message-ID: Joe, You are beeing a bit hard here but thank you for reporting this. I'm also waiting for a better solution for invoices number but I have to admit I did not spend the necessary time to look at the new code in 5.0.3. Thank you. David V. 2007/5/15, Joe Bordes : > Hi, > > I have just looked at this code. > I believe that this is not the correct way to solve the autoincrement > problem > Perfectioning the code that already exists in forum/wiki for this you > would have had a more complete solution that would serve any module. > Instead you have whipped up your own solution which is probably not > multi-user safe, you have hardcoded english text into a checkduplicate > function which would not be necessary if you were using the database > which is already transaction and multiuser safe and you are writing php > files with code each time an invoice is made. > Have you at all thought about 4-5 people making invoices at a time? > Why are you still hardcoding strings in the code? > Why not trust the database to avoid overlapping? I mean the database > guys have solved this problem a long time ago, who are we to invent a > new untested system? > > As normal you leave aside the community. > > I know I am becomming a persona non grata here, but somebody has to say > these things. If you keep in this line this product is doomed. > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From chazarra.clement at gmail.com Mon May 21 09:20:04 2007 From: chazarra.clement at gmail.com (clement chazarra) Date: Mon, 21 May 2007 14:20:04 +0100 Subject: [Vtigercrm-developers] Security focus Message-ID: Hello everybody, I just wanted to point out a little document from drupal community highlighting secure ways to code. http://drupal.org/writing-secure-code My suggestion would even be to add in the wiki a "Security focus" page where we could add the different techniques developers should follow to produce secure code. If at some points the list seems quite complete and up to date, it might be a good idea to schedule a release dedicated on that matter and upgrade the whole code. Other pages in the wiki could be created as well, focusing on different important matters like performance/usability/etc. Byebye Clem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070521/b4c9e07d/attachment-0002.html From joe at tsolucio.com Mon May 28 11:40:07 2007 From: joe at tsolucio.com (Joe Bordes) Date: Mon, 28 May 2007 17:40:07 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 Message-ID: <1180366807.23252.14.camel@joesunix.int> Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio From aissa at abonlinesolutions.com Mon May 28 11:42:41 2007 From: aissa at abonlinesolutions.com (=?iso-8859-1?B?Qe9zc2E=?=) Date: Mon, 28 May 2007 17:42:41 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <1180366807.23252.14.camel@joesunix.int> References: <1180366807.23252.14.camel@joesunix.int> Message-ID: <000001c7a13e$d4db3ad0$7e91b070$@com> Idem here, it's bizarre. A?ssa ABOnline solutions -----Message d'origine----- De?: Joe Bordes [mailto:joe at tsolucio.com] Envoy??: lundi 28 mai 2007 17:40 ??: vtigercrm-developers at lists.vtigercrm.com Objet?: [Vtigercrm-developers] svn trunk in branches/5.0.3 Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From richie at vtiger.com Mon May 28 17:26:08 2007 From: richie at vtiger.com (richie) Date: Tue, 29 May 2007 02:56:08 +0530 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <000001c7a13e$d4db3ad0$7e91b070$@com> References: <1180366807.23252.14.camel@joesunix.int> <000001c7a13e$d4db3ad0$7e91b070$@com> Message-ID: <465B48F0.1020908@vtiger.com> Yes. Michel jaquemes had checked in the entire application as a separate folder. I have removed it. Pl. try now. Michel: I have revoked your permission to do mischief for now ;-) *Richie* A?ssa wrote: > Idem here, it's bizarre. > A?ssa > ABOnline solutions > > -----Message d'origine----- > De : Joe Bordes [mailto:joe at tsolucio.com] > Envoy? : lundi 28 mai 2007 17:40 > ? : vtigercrm-developers at lists.vtigercrm.com > Objet : [Vtigercrm-developers] svn trunk in branches/5.0.3 > > Hi, > > I just "updated" my svn version and recieved a new "trunk" directory > containing the whole application???? > > Joe > TSolucio > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/cbcb280f/attachment-0002.html From brian at pr2k.com Tue May 29 22:34:18 2007 From: brian at pr2k.com (Brian Laughlin) Date: Tue, 29 May 2007 19:34:18 -0700 Subject: [Vtigercrm-developers] Patch for decoupling Accounts from Potential Message-ID: <27CABE0A5EFD714EA5B2F9B47EE5CB85EDD693@svawmc1.awnow.local> We have a simple way of accomplishing this. Would love to see this or something like it roled into the main branch after 5.0.3 is released. http://forums.vtiger.com/viewtopic.php?p=47584#47584 Regards, Brian Laughlin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/3b8f7b0a/attachment-0003.html From gopals at vtiger.com Thu May 31 08:41:42 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 31 May 2007 18:11:42 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <465EC286.9060507@vtiger.com> Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal From richie at vtiger.com Thu May 31 09:12:34 2007 From: richie at vtiger.com (richie) Date: Thu, 31 May 2007 18:42:34 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC286.9060507@vtiger.com> References: <465EC286.9060507@vtiger.com> Message-ID: <465EC9C2.8040301@vtiger.com> Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 Thank you all for your patience and faith, *Richie* Gopal wrote: > Dear Team, > > I am happy to inform you all that we have successfully completed all our > routine tests. We are expecting release in another few hours time. > > Thanks & Regards, > Gopal > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/74578fc5/attachment-0003.html From brett.hooker at roarz.com Thu May 31 09:48:38 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 31 May 2007 23:48:38 +1000 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC9C2.8040301@vtiger.com> References: <465EC286.9060507@vtiger.com> <465EC9C2.8040301@vtiger.com> Message-ID: <465ED236.30205@roarz.com> Definition of popularity? Bringing SourceForge down when you release a product: richie wrote: > Dear Team, > > vtigercrm-5.0.3 is officially released. > You can have a look at the files at > http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 > > Thank you all for your patience and faith, > *Richie* > > Gopal wrote: >> Dear Team, >> >> I am happy to inform you all that we have successfully completed all our >> routine tests. We are expecting release in another few hours time. >> >> Thanks & Regards, >> Gopal >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0004.html -------------- next part -------------- A non-text attachment was scrubbed... Name: vt503dl-error.png Type: image/png Size: 52074 bytes Desc: not available Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0002.png From rvpromociones at yahoo.es Thu May 31 19:00:58 2007 From: rvpromociones at yahoo.es (Yosu Cadilla) Date: Thu, 31 May 2007 23:00:58 +0000 (GMT) Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <20070531230058.75110.qmail@web28008.mail.ukl.yahoo.com> Indeed! Saludos, Yosu Cadilla. ____________________________________________________________________________________ ?Descubre una nueva forma de obtener respuestas a tus preguntas! Entra en Yahoo! Respuestas. http://es.answers.yahoo.com/info/welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/14773489/attachment-0003.html From weigelt at metux.de Tue May 1 10:58:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 19:58:50 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <20070501175850.GB26224@nibiru.local> * Jorge Torres schrieb: Hi, > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that > may differ a lot from what vtiger golas might be, therefore I want > to start a new project at sourceforge.net based on vtigerCRM 5. Of course you're free to do your own fork, but I'd like to invite you to contribute to the upstream. If you're moving too far from the upstream, we cannot benefit from each other's work anymore. BTW: I'm currently working on my own branch for really porting it to postgresql. There're lots of things to clean up here. Once this is is done (and hopefully went to the upstream), I'm going to some works on making it easier to use (ie. switch off unused features). Maybe you'd like to join me ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Tue May 1 12:48:36 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 1 May 2007 14:48:36 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501175850.GB26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> Message-ID: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Enrico, Sure count me in, Can you send me some of your todo list, so I can check what I'm capable of helping with? That minimized branch you mentioned, would it still support MySQL? At this moment, I'm working on changing the pop-up windows, for WebWM windows, anyhow I will prepare a todo list I have in mind, so you get to see where we can join forces. Thank you, Jorge On 5/1/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Of course you're free to do your own fork, but I'd like to invite > you to contribute to the upstream. If you're moving too far from the > upstream, we cannot benefit from each other's work anymore. > > BTW: I'm currently working on my own branch for really porting it to > postgresql. There're lots of things to clean up here. Once this is > is done (and hopefully went to the upstream), I'm going to some > works on making it easier to use (ie. switch off unused features). > > Maybe you'd like to join me ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070501/689d85dc/attachment-0004.html From weigelt at metux.de Tue May 1 13:05:52 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 1 May 2007 22:05:52 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> Message-ID: <20070501200552.GC26224@nibiru.local> * Jorge Torres schrieb: Hi, > Can you send me some of your todo list, so I can check what > I'm capable of helping with? The most important, for now, is to replace all the $adb->query_result() calls, since a) it does not work with postgresql (adodb brokenness) and b) it's an huge resource waster. > That minimized branch you mentioned, would it still support MySQL? Yep. I don't intend to drop it. > At this moment, I'm working on changing the pop-up windows, for WebWM > windows, anyhow I will prepare a todo list I have in mind, so you get to see > where we can join forces. Ok. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From dome at tel.co.th Tue May 1 18:06:13 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 08:06:13 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> What's status of your poetgresql branch ? Can i test ? Dome C. On 5/2/07, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From gopals at vtiger.com Tue May 1 21:19:25 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 02 May 2007 09:49:25 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> Message-ID: <4638114D.5010303@vtiger.com> Hi Jorge, Thanks for your interest in vtiger CRM project. Please see my response below (in blue color) Jorge Torres wrote: > Hi everyone, > > First I want to tell you developers that I admire your work. I first > downloaded vtiger a few days ago, for customer relationship management > at my uncles little ceramic factory, and I was amazed, but after I > showed it to him, well, it seems that it is too much for what my uncle > wants. * Gopal:* From the Security settings module, you can disable modules/fields that are not required. Please get back to me if you need any further clarifications. > I love PHP, and I thought that I could minimize it to what at this > moment I need, and in near future add more AJAX to it. I know that may > differ a lot from what vtiger golas might be, therefore I want to > start a new project at sourceforge.net based > on vtigerCRM 5. * Gopal:* Down the road, we are planning to make vtiger CRM - fully customizable so that business users configure the vtiger system instead of hacking the code. Could you please post your goals, so that we will cross-check our road map and let you know our position? > I don't understand to much about Open Source Licencing restrictions > and related stuff, so please excuse my ignorance. My question are: * Gopal:* vtiger CRM code base contains our _*own contributions*_ and many third-party packages. Our own contributions are released under _vtiger Public License (based on Mozilla Public License)_. Please refer to the following URL for details about licenses of third-party packages: http://wiki.vtiger.com/index.php/Third_Party_Software > > Can I start a new project at sourceforge based on vtiger? * Gopal:* In general there are no issues in forking open source projects, provided you are not violating the Open Source license of your predecessor. > If so, Would I have to cover it under some other new license type? *Gopal:* Release your contributions under some Open Source license which meets your requirements. > Do I need some permit from vtiger team to start such project? * Gopal:* _vtiger CRM code base_ is 100% open source by spirit. Hence you may not require special permission from our side. > I know about removing logos because of trademarks, what else do I have > to remove? * > * * Gopal:* Kindly review the vtiger and other third-party licenses with your Legal adviser (council) before modifying back-end/front-end code base. On a separate note, our community is actively participating in vtiger development. Most of the community members (developers/testers/writers/translators) are directly contributing to the core code base (For example: PostgreSQL & DMS branches in our SVN). http://vtiger.fosslabs.com We are also encouraging many add-on projects based on vtiger CRM, which cater to the need of user-specific requirements. For more details, please refer to our vtigerForge: http://vtigerforge.com Best wishes, Gopal (vtiger - Team Member) > > Well that's it for now, I will continue on my "trying to understand > vtiger's code" task, so I will probably have some questions related to > developing in short. > > Thank you very much, > > > Jorge > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/48cab81f/attachment-0004.html From jens at Strawberry.COM Tue May 1 23:20:57 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:20:57 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070501200552.GC26224@nibiru.local>; from Enrico Weigelt on Tue, May 01, 2007 at 10:05:52PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> Message-ID: <20070502082057.D16394@Strawberry.COM> Hi, I already did a port to postgresql and have contributed my patches to Don and Ritchie so far. I do not agree that the $adb->query_results are broken as I'm running on postgresql since 5.0rc1 ... Jens On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Can you send me some of your todo list, so I can check what > > I'm capable of helping with? > > The most important, for now, is to replace all the $adb->query_result() > calls, since a) it does not work with postgresql (adodb brokenness) > and b) it's an huge resource waster. > > > That minimized branch you mentioned, would it still support MySQL? > > Yep. I don't intend to drop it. > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > where we can join forces. > > Ok. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Tue May 1 23:21:30 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 08:21:30 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:06:13AM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502082130.E16394@Strawberry.COM> You may use the 5.1_jens branch which is working. Jens On Wed, May 02, 2007 at 08:06:13AM +0700, Dome Charoenyost wrote: > What's status of your poetgresql branch ? > > Can i test ? > > Dome C. > > > On 5/2/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 2 03:35:59 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 12:35:59 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638114D.5010303@vtiger.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> Message-ID: <1178102159.31989.24.camel@joesunix.int> Hi, I read this thread and I just keep asking myself: what am I doing wrong? You guys have branches and are participating. I have been asking to help for a long time now and I am just being ignored. I really would like to help and work together. Joe TSolucio El mi?, 02-05-2007 a las 09:49 +0530, Gopal escribi?: > Hi Jorge, > > Thanks for your interest in vtiger CRM project. > > Please see my response below (in blue color) > > Jorge Torres wrote: > > Hi everyone, > > > > First I want to tell you developers that I admire your work. I first > > downloaded vtiger a few days ago, for customer relationship > > management at my uncles little ceramic factory, and I was amazed, > > but after I showed it to him, well, it seems that it is too much for > > what my uncle wants. > > Gopal: From the Security settings module, you can disable > modules/fields that are not required. Please get back to me if you > need any further clarifications. > > I love PHP, and I thought that I could minimize it to what at this > > moment I need, and in near future add more AJAX to it. I know that > > may differ a lot from what vtiger golas might be, therefore I want > > to start a new project at sourceforge.net based on vtigerCRM 5. > > Gopal: Down the road, we are planning to make vtiger CRM - fully > customizable so that business users configure the vtiger system > instead of hacking the code. Could you please post your goals, so > that we will cross-check our road map and let you know our position? > > I don't understand to much about Open Source Licencing restrictions > > and related stuff, so please excuse my ignorance. My question are: > > Gopal: vtiger CRM code base contains our own contributions and many > third-party packages. Our own contributions are released under vtiger > Public License (based on Mozilla Public License). Please refer to the > following URL for details about licenses of third-party packages: > > http://wiki.vtiger.com/index.php/Third_Party_Software > > > > Can I start a new project at sourceforge based on vtiger? > > Gopal: In general there are no issues in forking open source projects, > provided you are not violating the Open Source license of your > predecessor. > > If so, Would I have to cover it under some other new license type? > Gopal: Release your contributions under some Open Source license which > meets your requirements. > > Do I need some permit from vtiger team to start such project? > > Gopal: vtiger CRM code base is 100% open source by spirit. Hence you > may not require special permission from our side. > > I know about removing logos because of trademarks, what else do I > > have to remove? > > Gopal: Kindly review the vtiger and other third-party licenses with > your Legal adviser (council) before modifying back-end/front-end code > base. > > On a separate note, our community is actively participating in vtiger > development. Most of the community members > (developers/testers/writers/translators) are directly contributing to > the core code base (For example: PostgreSQL & DMS branches in our > SVN). > > http://vtiger.fosslabs.com > > We are also encouraging many add-on projects based on vtiger CRM, > which cater to the need of user-specific requirements. For more > details, please refer to our vtigerForge: > > http://vtigerforge.com > > Best wishes, > Gopal > (vtiger - Team Member) > > > > Well that's it for now, I will continue on my "trying to understand > > vtiger's code" task, so I will probably have some questions related > > to developing in short. > > > > Thank you very much, > > > > > > Jorge > > > > ____________________________________________________________________ > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Wed May 2 03:56:24 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 12:56:24 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> Message-ID: <20070502105624.GA5311@nibiru.local> * Dome Charoenyost schrieb: > What's status of your poetgresql branch ? Work is still in progress. > Can i test ? I'll try to get some patches ready today. Or should I upload to SVN (need some short howto, I'm not really expierenced w/ svn) ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 2 04:13:36 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 13:13:36 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <20070502111336.GB5311@nibiru.local> * Jens Hamisch schrieb: Hi, > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... well, I can only speak for the latest release and my trunk checkout of last week. a) several things in schema create needed to be fixed b) schema update (ie. ALTER TABLE ...) was totally broken c) the adodb Move() method was completely missing in the postgres driver And the $adb->query_results() thing: Well, it's and really bad idea (even if pgsql->Move() would work). Too much complexity in- and outside, too long codepathes, too inefficient. I've introduced some new query functions: * $adb->run_query_allrecords($query) -> returns the result in an array/list records (associative arrays) * $adb->run_query_record($query) -> returns only the first record. * $adb->run_query_field($query,$field) -> returns given field from the first record * $adb->run_query_list($query,$field) -> returns an list of the values from given field. Now I'm in the process of rewriting the calls to query_result() to an appropriate of the new functions. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 2 06:24:47 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 15:24:47 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502111336.GB5311@nibiru.local>; from Enrico Weigelt on Wed, May 02, 2007 at 01:13:36PM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> Message-ID: <20070502152447.A6085@Strawberry.COM> Hi, please have a look at the 5.1_jens branch at first! This is a 5.0.3 release sucessfully running on postgresql. This version is stable. The database fixes were introduced in an early 5.0 prerelease. I'm running vtiger on postgres since then. Part of the patches were already implemented in 5.0GA. The rest was posted to Richie/Don about 3 weeks ago. JenS On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > I already did a port to postgresql and have contributed my patches to > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > broken as I'm running on postgresql since 5.0rc1 ... > > well, I can only speak for the latest release and my trunk checkout > of last week. > > a) several things in schema create needed to be fixed > b) schema update (ie. ALTER TABLE ...) was totally broken > c) the adodb Move() method was completely missing in the postgres driver > > And the $adb->query_results() thing: > Well, it's and really bad idea (even if pgsql->Move() would work). > Too much complexity in- and outside, too long codepathes, too inefficient. > > I've introduced some new query functions: > > * $adb->run_query_allrecords($query) > -> returns the result in an array/list records (associative arrays) > > * $adb->run_query_record($query) > -> returns only the first record. > > * $adb->run_query_field($query,$field) > -> returns given field from the first record > > * $adb->run_query_list($query,$field) > -> returns an list of the values from given field. > > Now I'm in the process of rewriting the calls to query_result() > to an appropriate of the new functions. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 06:45:38 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:45:38 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502152447.A6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> Message-ID: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> i still found error on 5.1_jens Fatal error: Call to a member function on a non-object in /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 postgresql 8.1 php4.4 Debian etch Dome C. On 5/2/07, Jens Hamisch wrote: > > Hi, > > please have a look at the 5.1_jens branch at first! This is > a 5.0.3 release sucessfully running on postgresql. > This version is stable. The database fixes were introduced in > an early 5.0 prerelease. I'm running vtiger on postgres since > then. > > Part of the patches were already implemented in 5.0GA. The rest > was posted to Richie/Don about 3 weeks ago. > > JenS > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > * Jens Hamisch schrieb: > > > > Hi, > > > > > I already did a port to postgresql and have contributed my patches to > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > well, I can only speak for the latest release and my trunk checkout > > of last week. > > > > a) several things in schema create needed to be fixed > > b) schema update (ie. ALTER TABLE ...) was totally broken > > c) the adodb Move() method was completely missing in the postgres driver > > > > And the $adb->query_results() thing: > > Well, it's and really bad idea (even if pgsql->Move() would work). > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > I've introduced some new query functions: > > > > * $adb->run_query_allrecords($query) > > -> returns the result in an array/list records (associative arrays) > > > > * $adb->run_query_record($query) > > -> returns only the first record. > > > > * $adb->run_query_field($query,$field) > > -> returns given field from the first record > > > > * $adb->run_query_list($query,$field) > > -> returns an list of the values from given field. > > > > Now I'm in the process of rewriting the calls to query_result() > > to an appropriate of the new functions. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From dome at tel.co.th Wed May 2 06:46:16 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 20:46:16 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502105624.GA5311@nibiru.local> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <8ccbff060705011806h329d10afwfb63c5ebd56b1a9c@mail.gmail.com> <20070502105624.GA5311@nibiru.local> Message-ID: <8ccbff060705020646h4c848925k30338b574e6c2d60@mail.gmail.com> Please send me patch Thanks. Dome C. On 5/2/07, Enrico Weigelt wrote: > * Dome Charoenyost schrieb: > > What's status of your poetgresql branch ? > > Work is still in progress. > > > Can i test ? > > I'll try to get some patches ready today. > > Or should I upload to SVN (need some short howto, I'm not > really expierenced w/ svn) ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 07:37:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 16:37:37 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 08:45:38PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> Message-ID: <20070502163737.B6085@Strawberry.COM> Hi, I'm running php 5.1.4. According to the installation manual, 5.0.x thru 5.2.x is supported only. Jens On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > i still found error on 5.1_jens > Fatal error: Call to a member function on a non-object in > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > postgresql 8.1 > php4.4 > > Debian etch > > Dome C. > > > > On 5/2/07, Jens Hamisch wrote: > > > > Hi, > > > > please have a look at the 5.1_jens branch at first! This is > > a 5.0.3 release sucessfully running on postgresql. > > This version is stable. The database fixes were introduced in > > an early 5.0 prerelease. I'm running vtiger on postgres since > > then. > > > > Part of the patches were already implemented in 5.0GA. The rest > > was posted to Richie/Don about 3 weeks ago. > > > > JenS > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > * Jens Hamisch schrieb: > > > > > > Hi, > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > well, I can only speak for the latest release and my trunk checkout > > > of last week. > > > > > > a) several things in schema create needed to be fixed > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > And the $adb->query_results() thing: > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > I've introduced some new query functions: > > > > > > * $adb->run_query_allrecords($query) > > > -> returns the result in an array/list records (associative arrays) > > > > > > * $adb->run_query_record($query) > > > -> returns only the first record. > > > > > > * $adb->run_query_field($query,$field) > > > -> returns given field from the first record > > > > > > * $adb->run_query_list($query,$field) > > > -> returns an list of the values from given field. > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > to an appropriate of the new functions. > > > > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Wed May 2 08:22:52 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Wed, 2 May 2007 22:22:52 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502163737.B6085@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> Message-ID: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> I'm test on php 5.2 found object to string error ( in log->debug) when create new contact Call to a member function Move() on a non-object in /var/www/crmpgsql/include/database/PearDatabase.php on line 441 Dome C. On 5/2/07, Jens Hamisch wrote: > Hi, > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > 5.2.x is supported only. > > Jens > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > i still found error on 5.1_jens > > Fatal error: Call to a member function on a non-object in > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > postgresql 8.1 > > php4.4 > > > > Debian etch > > > > Dome C. > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > Hi, > > > > > > please have a look at the 5.1_jens branch at first! This is > > > a 5.0.3 release sucessfully running on postgresql. > > > This version is stable. The database fixes were introduced in > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > then. > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > was posted to Richie/Don about 3 weeks ago. > > > > > > JenS > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > * Jens Hamisch schrieb: > > > > > > > > Hi, > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > of last week. > > > > > > > > a) several things in schema create needed to be fixed > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > And the $adb->query_results() thing: > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > I've introduced some new query functions: > > > > > > > > * $adb->run_query_allrecords($query) > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > * $adb->run_query_record($query) > > > > -> returns only the first record. > > > > > > > > * $adb->run_query_field($query,$field) > > > > -> returns given field from the first record > > > > > > > > * $adb->run_query_list($query,$field) > > > > -> returns an list of the values from given field. > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > to an appropriate of the new functions. > > > > > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Wed May 2 09:00:05 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 2 May 2007 18:00:05 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com>; from Dome Charoenyost on Wed, May 02, 2007 at 10:22:52PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <20070502111336.GB5311@nibiru.local> <20070502152447.A6085@Strawberry.COM> <8ccbff060705020645h295a1815x12d8089d2b01cb9c@mail.gmail.com> <20070502163737.B6085@Strawberry.COM> <8ccbff060705020822h249304bajc8f6af8bf00590eb@mail.gmail.com> Message-ID: <20070502180005.A6711@Strawberry.COM> Hi Richie, didn't Mr. Priebsch tell us something about name space modifications between php 5.1.x and 5.2.0? In fact the version running at my side (php 5.1.4) seems run into problems on 5.2.0 ... Jens On Wed, May 02, 2007 at 10:22:52PM +0700, Dome Charoenyost wrote: > I'm test on php 5.2 found object to string error ( in log->debug) > > when create new contact > Call to a member function Move() on a non-object in > /var/www/crmpgsql/include/database/PearDatabase.php on line 441 > > Dome C. > > On 5/2/07, Jens Hamisch wrote: > > Hi, > > > > I'm running php 5.1.4. According to the installation manual, 5.0.x thru > > 5.2.x is supported only. > > > > Jens > > > > > > On Wed, May 02, 2007 at 08:45:38PM +0700, Dome Charoenyost wrote: > > > i still found error on 5.1_jens > > > Fatal error: Call to a member function on a non-object in > > > /home/ip/crmpgsql/include/database/PearDatabase.php on line 441 > > > > > > postgresql 8.1 > > > php4.4 > > > > > > Debian etch > > > > > > Dome C. > > > > > > > > > > > > On 5/2/07, Jens Hamisch wrote: > > > > > > > > Hi, > > > > > > > > please have a look at the 5.1_jens branch at first! This is > > > > a 5.0.3 release sucessfully running on postgresql. > > > > This version is stable. The database fixes were introduced in > > > > an early 5.0 prerelease. I'm running vtiger on postgres since > > > > then. > > > > > > > > Part of the patches were already implemented in 5.0GA. The rest > > > > was posted to Richie/Don about 3 weeks ago. > > > > > > > > JenS > > > > > > > > On Wed, May 02, 2007 at 01:13:36PM +0200, Enrico Weigelt wrote: > > > > > * Jens Hamisch schrieb: > > > > > > > > > > Hi, > > > > > > > > > > > I already did a port to postgresql and have contributed my patches to > > > > > > Don and Ritchie so far. I do not agree that the $adb->query_results are > > > > > > broken as I'm running on postgresql since 5.0rc1 ... > > > > > > > > > > well, I can only speak for the latest release and my trunk checkout > > > > > of last week. > > > > > > > > > > a) several things in schema create needed to be fixed > > > > > b) schema update (ie. ALTER TABLE ...) was totally broken > > > > > c) the adodb Move() method was completely missing in the postgres driver > > > > > > > > > > And the $adb->query_results() thing: > > > > > Well, it's and really bad idea (even if pgsql->Move() would work). > > > > > Too much complexity in- and outside, too long codepathes, too inefficient. > > > > > > > > > > I've introduced some new query functions: > > > > > > > > > > * $adb->run_query_allrecords($query) > > > > > -> returns the result in an array/list records (associative arrays) > > > > > > > > > > * $adb->run_query_record($query) > > > > > -> returns only the first record. > > > > > > > > > > * $adb->run_query_field($query,$field) > > > > > -> returns given field from the first record > > > > > > > > > > * $adb->run_query_list($query,$field) > > > > > -> returns an list of the values from given field. > > > > > > > > > > Now I'm in the process of rewriting the calls to query_result() > > > > > to an appropriate of the new functions. > > > > > > > > > > > > > > > cu > > > > > -- > > > > > --------------------------------------------------------------------- > > > > > Enrico Weigelt == metux IT service > > > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > > fax: +49 36207 519932 email: contact at metux.de > > > > > cellphone: +49 174 7066481 > > > > > --------------------------------------------------------------------- > > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > > --------------------------------------------------------------------- > > > > > _______________________________________________ > > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > > -- > > > > > > > > -------------------------------------------------------------------------------- > > > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > > SSSSS-----SSSSS > > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > > SSSSSSSSS Jens Hamisch > > > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 2 09:31:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 2 May 2007 18:31:09 +0200 Subject: [Vtigercrm-developers] insert data function Message-ID: <20070502163109.GA19391@nibiru.local> Hi folks, JFYI: I've added an new function run_insert_data($table,$data) to the PearDatabase lass ($adb). It handles the cases where simply one record is inserted to some table. The sql query is built from an associative array (in fact this is done by sql_insert_data()), executed and if an error is detected, an error is thrown. I'm going to submit an patch this afternoon. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 2 12:13:25 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:13:25 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070502082057.D16394@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> Message-ID: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Hi, Since it is now clear that postgres is supported, the only thing would be about Enrico's opinion of adb->query_results being resource wasting, which is very important regardless of mysql or postgres use, Enrico, what are you doing instead of using the query_results method? About the other thing here is a todo list which could possibly be common with vtiger's: - Use WebWM (webwm.sourceforge.net), instead of porpup windows which are blocked by internet explorer and sometimes firefox, also use WebWM for virtual windows, such as the ones in editing custom fields. - I don't know why imap email doest work, I get the message that email should be configured, even if it is in fact configured, well so i will try to fix that, + adding imap options to the Add user template, - DHTML Customizable pdf sheet creator for sales-orders and the others, - AJAX calendar refresh, and adding standard calendar view on a floating window. - Date field DHTML floating box. - Help DHTML widgets, which will soon be offered by the webwm framework. - Translation facility, probably a script that reads every lang file, and organizes it in a HTML form, and then form it regenerate the lang files, so language translation can be made from web, rather that getting into the code, + the fact of making it a lot more easier when adding new definitions and translating them to the other files. Well with that I think I have lot to play with for some time. Thank you, Jorge On 5/2/07, Jens Hamisch wrote: > > > Hi, > > I already did a port to postgresql and have contributed my patches to > Don and Ritchie so far. I do not agree that the $adb->query_results are > broken as I'm running on postgresql since 5.0rc1 ... > > Jens > > > On Tue, May 01, 2007 at 10:05:52PM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Can you send me some of your todo list, so I can check what > > > I'm capable of helping with? > > > > The most important, for now, is to replace all the $adb->query_result() > > calls, since a) it does not work with postgresql (adodb brokenness) > > and b) it's an huge resource waster. > > > > > That minimized branch you mentioned, would it still support MySQL? > > > > Yep. I don't intend to drop it. > > > > > At this moment, I'm working on changing the pop-up windows, for WebWM > > > windows, anyhow I will prepare a todo list I have in mind, so you get > to see > > > where we can join forces. > > > > Ok. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/1c28fc7c/attachment-0005.html From joe at tsolucio.com Wed May 2 12:37:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 02 May 2007 21:37:14 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <4638E86A.70707@tsolucio.com> Hi Jorge, Jorge Torres escribi?: > Hi, > > Since it is now clear that postgres is supported, the only thing would > be about Enrico's opinion of adb->query_results being resource > wasting, which is very important regardless of mysql or postgres use, > Enrico, what are you doing instead of using the query_results method? > > About the other thing here is a todo list which could possibly be > common with vtiger's: > > - Use WebWM (webwm.sourceforge.net ), > instead of porpup windows which are blocked by internet explorer and > sometimes firefox, also use WebWM for virtual windows, such as the > ones in editing custom fields. > Really nice. Hope you can get somewhere. > - I don't know why imap email doest work, I get the message that email > should be configured, even if it is in fact configured, well so i will > try to fix that, + adding imap options to the Add user template, > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > - AJAX calendar refresh, and adding standard calendar view on a > floating window. > > - Date field DHTML floating box. > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > - Translation facility, probably a script that reads every lang file, > and organizes it in a HTML form, and then form it regenerate the lang > files, so language translation can be made from web, rather that > getting into the code, + the fact of making it a lot more easier when > adding new definitions and translating them to the other files. > Try the Language Wizard in vtigerforge. This is what I use and I think it is a very good module, it does exactly what you are asking for. > Well with that I think I have lot to play with for some time. > > Thank you, > > Jorge > Joe TSolucio From jorge.torres.maldonado at gmail.com Wed May 2 12:59:12 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 2 May 2007 14:59:12 -0500 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <4638E86A.70707@tsolucio.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <4638E86A.70707@tsolucio.com> Message-ID: <530c7d700705021259r4d70223cmd6981af85d4d1360@mail.gmail.com> Thanks Joe, language module seems awesome On 5/2/07, Joe Bordes wrote: > > Hi Jorge, > > Jorge Torres escribi?: > > Hi, > > > > Since it is now clear that postgres is supported, the only thing would > > be about Enrico's opinion of adb->query_results being resource > > wasting, which is very important regardless of mysql or postgres use, > > Enrico, what are you doing instead of using the query_results method? > > > > About the other thing here is a todo list which could possibly be > > common with vtiger's: > > > > - Use WebWM (webwm.sourceforge.net ), > > instead of porpup windows which are blocked by internet explorer and > > sometimes firefox, also use WebWM for virtual windows, such as the > > ones in editing custom fields. > > > Really nice. Hope you can get somewhere. > > > - I don't know why imap email doest work, I get the message that email > > should be configured, even if it is in fact configured, well so i will > > try to fix that, + adding imap options to the Add user template, > > > > - DHTML Customizable pdf sheet creator for sales-orders and the others, > > > > - AJAX calendar refresh, and adding standard calendar view on a > > floating window. > > > > - Date field DHTML floating box. > > > > - Help DHTML widgets, which will soon be offered by the webwm framework. > > > > - Translation facility, probably a script that reads every lang file, > > and organizes it in a HTML form, and then form it regenerate the lang > > files, so language translation can be made from web, rather that > > getting into the code, + the fact of making it a lot more easier when > > adding new definitions and translating them to the other files. > > > Try the Language Wizard in vtigerforge. This is what I use and I think > it is a very good module, it does exactly what you are asking for. > > Well with that I think I have lot to play with for some time. > > > > Thank you, > > > > Jorge > > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070502/3ed19b0a/attachment-0003.html From weigelt at metux.de Wed May 2 19:36:53 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 04:36:53 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> Message-ID: <20070503023653.GA29236@nibiru.local> * Jorge Torres schrieb: Hi, > Since it is now clear that postgres is supported, the only thing would be > about Enrico's opinion of adb->query_results being resource wasting, which > is very important regardless of mysql or postgres use, Enrico, what are > you doing instead of using the query_results method? As already said: introduced some new functions, which fetch either one record (run_query_record() and run_query_field()) or all records (run_query_allrecords() and run_query_list()) and simply return the data. There are several result types: a) just one scalar: -> run_query_field($query,$fieldname) --> returns an scalar b) just one record: -> run_query_record($query) --> returns an associative array c) an list of scalars -> run_query_list($query,$fieldname) --> returns an array/list of scalars d) an list of records: -> run_query_allreords($query) --> returns an array/list of ass. arrays cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gopals at vtiger.com Wed May 2 21:26:58 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 03 May 2007 09:56:58 +0530 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <1178102159.31989.24.camel@joesunix.int> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <4638114D.5010303@vtiger.com> <1178102159.31989.24.camel@joesunix.int> Message-ID: <46396492.7010106@vtiger.com> Hi Joe, Sorry for the inconvenience. We don't have issues in providing separate branches for our developer community. Could you please send us your future development plans to philip at vtiger.com so that he will create branches based on your requirements. Regards, Gopal Joe Bordes wrote: > Hi, > > I read this thread and I just keep asking myself: > what am I doing wrong? > > You guys have branches and are participating. I have been asking to help > for a long time now and I am just being ignored. > > I really would like to help and work together. > > Joe > TSolucio > > El mi??, 02-05-2007 a las 09:49 +0530, Gopal escribi??: > >> Hi Jorge, >> >> Thanks for your interest in vtiger CRM project. >> >> Please see my response below (in blue color) >> >> Jorge Torres wrote: >> >>> Hi everyone, >>> >>> First I want to tell you developers that I admire your work. I first >>> downloaded vtiger a few days ago, for customer relationship >>> management at my uncles little ceramic factory, and I was amazed, >>> but after I showed it to him, well, it seems that it is too much for >>> what my uncle wants. >>> >> Gopal: From the Security settings module, you can disable >> modules/fields that are not required. Please get back to me if you >> need any further clarifications. >> >>> I love PHP, and I thought that I could minimize it to what at this >>> moment I need, and in near future add more AJAX to it. I know that >>> may differ a lot from what vtiger golas might be, therefore I want >>> to start a new project at sourceforge.net based on vtigerCRM 5. >>> >> Gopal: Down the road, we are planning to make vtiger CRM - fully >> customizable so that business users configure the vtiger system >> instead of hacking the code. Could you please post your goals, so >> that we will cross-check our road map and let you know our position? >> >>> I don't understand to much about Open Source Licencing restrictions >>> and related stuff, so please excuse my ignorance. My question are: >>> >> Gopal: vtiger CRM code base contains our own contributions and many >> third-party packages. Our own contributions are released under vtiger >> Public License (based on Mozilla Public License). Please refer to the >> following URL for details about licenses of third-party packages: >> >> http://wiki.vtiger.com/index.php/Third_Party_Software >> >>> Can I start a new project at sourceforge based on vtiger? >>> >> Gopal: In general there are no issues in forking open source projects, >> provided you are not violating the Open Source license of your >> predecessor. >> >>> If so, Would I have to cover it under some other new license type? >>> >> Gopal: Release your contributions under some Open Source license which >> meets your requirements. >> >>> Do I need some permit from vtiger team to start such project? >>> >> Gopal: vtiger CRM code base is 100% open source by spirit. Hence you >> may not require special permission from our side. >> >>> I know about removing logos because of trademarks, what else do I >>> have to remove? >>> >> Gopal: Kindly review the vtiger and other third-party licenses with >> your Legal adviser (council) before modifying back-end/front-end code >> base. >> >> On a separate note, our community is actively participating in vtiger >> development. Most of the community members >> (developers/testers/writers/translators) are directly contributing to >> the core code base (For example: PostgreSQL & DMS branches in our >> SVN). >> >> http://vtiger.fosslabs.com >> >> We are also encouraging many add-on projects based on vtiger CRM, >> which cater to the need of user-specific requirements. For more >> details, please refer to our vtigerForge: >> >> http://vtigerforge.com >> >> Best wishes, >> Gopal >> (vtiger - Team Member) >> >>> Well that's it for now, I will continue on my "trying to understand >>> vtiger's code" task, so I will probably have some questions related >>> to developing in short. >>> >>> Thank you very much, >>> >>> >>> Jorge >>> >>> ____________________________________________________________________ >>> >>> _______________________________________________ >>> Reach hundreds of potential candidates - http://jobs.vtiger.com >>> >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070503/f24f5451/attachment-0005.html From jens at Strawberry.COM Wed May 2 23:54:27 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 08:54:27 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503023653.GA29236@nibiru.local>; from Enrico Weigelt on Thu, May 03, 2007 at 04:36:53AM +0200 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> Message-ID: <20070503085427.A9675@Strawberry.COM> Hi Enrico, my fixes adress syntactical postgres support only. However yours also seems to improove performance. Is there any chance to have both fixes implemented (@don,richie)? Jens On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > * Jorge Torres schrieb: > > Hi, > > > Since it is now clear that postgres is supported, the only thing would be > > about Enrico's opinion of adb->query_results being resource wasting, which > > is very important regardless of mysql or postgres use, Enrico, what are > > you doing instead of using the query_results method? > > As already said: introduced some new functions, which fetch either > one record (run_query_record() and run_query_field()) or all records > (run_query_allrecords() and run_query_list()) and simply return the data. > > There are several result types: > > a) just one scalar: -> run_query_field($query,$fieldname) > --> returns an scalar > b) just one record: -> run_query_record($query) > --> returns an associative array > c) an list of scalars -> run_query_list($query,$fieldname) > --> returns an array/list of scalars > d) an list of records: -> run_query_allreords($query) > --> returns an array/list of ass. arrays > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Thu May 3 05:28:02 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 19:28:02 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Jens, I try to test your branch with lxampp 1.5.3a (php 5.1.4) found same error Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 Please give me more information about php,postgresql version ? Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi Enrico, > > my fixes adress syntactical postgres support only. However > yours also seems to improove performance. Is there any chance > to have both fixes implemented (@don,richie)? > > Jens > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > > > Hi, > > > > > Since it is now clear that postgres is supported, the only thing would be > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > is very important regardless of mysql or postgres use, Enrico, what are > > > you doing instead of using the query_results method? > > > > As already said: introduced some new functions, which fetch either > > one record (run_query_record() and run_query_field()) or all records > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > There are several result types: > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > --> returns an scalar > > b) just one record: -> run_query_record($query) > > --> returns an associative array > > c) an list of scalars -> run_query_list($query,$fieldname) > > --> returns an array/list of scalars > > d) an list of records: -> run_query_allreords($query) > > --> returns an array/list of ass. arrays > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From jens at Strawberry.COM Thu May 3 06:40:04 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:40:04 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503154004.D6711@Strawberry.COM> Hi, my port is running on Solaris 10, postgres 8.1.2, PHP 5.1.4 Jens On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Thu May 3 06:56:34 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 3 May 2007 15:56:34 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com>; from Dome Charoenyost on Thu, May 03, 2007 at 07:28:02PM +0700 References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> Message-ID: <20070503155634.A11877@Strawberry.COM> Hi, I've verfied the 5.1_jens PearDatabase.php to my running version and found no differences. Could you please check the one attached to this mail to the one you're testing against? Kind regards, Jens Hamisch On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > Jens, > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > found same error > Fatal error: Call to a member function Move() on a non-object in > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > Please give me more information about php,postgresql version ? > > Dome C. > > On 5/3/07, Jens Hamisch wrote: > > > > Hi Enrico, > > > > my fixes adress syntactical postgres support only. However > > yours also seems to improove performance. Is there any chance > > to have both fixes implemented (@don,richie)? > > > > Jens > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > * Jorge Torres schrieb: > > > > > > Hi, > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > you doing instead of using the query_results method? > > > > > > As already said: introduced some new functions, which fetch either > > > one record (run_query_record() and run_query_field()) or all records > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > There are several result types: > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > --> returns an scalar > > > b) just one record: -> run_query_record($query) > > > --> returns an associative array > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > --> returns an array/list of scalars > > > d) an list of records: -> run_query_allreords($query) > > > --> returns an array/list of ass. arrays > > > > > > cu > > > -- > > > --------------------------------------------------------------------- > > > Enrico Weigelt == metux IT service > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > fax: +49 36207 519932 email: contact at metux.de > > > cellphone: +49 174 7066481 > > > --------------------------------------------------------------------- > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > --------------------------------------------------------------------- > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -- > > > > -------------------------------------------------------------------------------- > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > SSSSS-----SSSSS > > ---SSSSS--------- fon (+49 8171) 41805-0 > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > SSSSSSSSS Jens Hamisch > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 -------------- next part -------------- info("PearDatabse ->".print_r($msg,true)); } else { $log1->info("PearDatabase ->".$msg); } return $msg; } function setDieOnError($value){ $this->dieOnError = $value; } function setDatabaseType($type){ $this->dbType = $type; } function setUserName($name){ $this->userName = $name; } function setOption($name, $value){ if(isset($this->dbOptions)) $this->dbOptions[$name] = $value; if(isset($this->database)) $this->database->setOption($name, $value); } function setUserPassword($pass){ $this->userPassword = $pass; } function setDatabaseName($db){ $this->dbName = $db; } function setDatabaseHost($host){ $this->dbHostName = $host; } function getDataSourceName(){ return $this->dbType. "://".$this->userName.":".$this->userPassword."@". $this->dbHostName . "/". $this->dbName; } function startTransaction() { $this->checkConnection(); $this->println("TRANS Started"); $this->database->StartTrans(); } function completeTransaction() { if($this->database->HasFailedTrans()) $this->println("TRANS Rolled Back"); else $this->println("TRANS Commited"); $this->database->CompleteTrans(); $this->println("TRANS Completed"); } /* ADODB converted * function checkError($msg='', $dieOnError=false) * { * if($this->dbType == "mysql") * { * if (mysql_errno()) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } * return false; * } * else * { * if(!isset($this->database)) * { * $this->log->error("Database Is Not Connected"); * return true; * } * if(DB::isError($this->database)) * { * if($this->dieOnError || $dieOnError) * { * $this->log->fatal($msg.$this->database->getMessage()); * die ($msg.$this->database->getMessage()); * } else { * $this->log->error($msg.$this->database->getMessage()); * } * return true; * } * } * return false; * } */ function checkError($msg='', $dieOnError=false) { /* * if($this->database->ErrorNo()) * { * if($this->dieOnError || $dieOnError) * { * $this->println("ADODB error ".$this->database->ErrorNo()); * die ($msg."ADODB error ".$this->database->ErrorNo()); * } else { * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); * } * return true; * } */ if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); die ($msg."ADODB error ".$msg."->".$this->database->ErrorMsg()); } else { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); } return false; } function change_key_case($arr) { return is_array($arr)?array_change_key_case($arr):$arr; } var $req_flist; /** * @return void * @desc checks if a connection exists if it does not it closes the connection * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. * All Rights Reserved.. * Contributor(s): ______________________________________.. */ function checkConnection(){ global $log; if(!isset($this->database)) { $this->println("TRANS creating new connection"); /* * $flist=get_included_files(); * foreach($flist as $key=>$value) * { * if(!strstr($value,'\\modules') && !strstr($value,'\\data')) * unset($flist[$key]); * } * $this->println($flist); */ $this->connect(false); } else { //$this->println("checkconnect using old connection"); } } /* ADODB converted * function query($sql, $dieOnError=false, $msg='') * { * $this->println("query ".$sql); * $this->log->info('Query:' . $sql); * $this->checkConnection(); * $this->query_time = microtime(); * if($this->dbType == "mysql") * { * $result =& mysql_query($sql); * $this->lastmysqlrow = -1; * } else { * $result =& $this->database->query($sql); * } * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function query($sql, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB query ".$sql); $log->debug('query being executed : '.$sql); $this->checkConnection(); $result = & $this->database->Execute($sql); $this->lastmysqlrow = -1; if(!$result)$this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); return $result; } function getEmptyBlob() { //if(dbType=="oci8") return 'empty_blob()'; //else return 'null'; return 'null'; } function updateBlob($tablename, $colname, $id, $data) { $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id); $this->checkConnection(); $result = $this->database->UpdateBlob($tablename, $colname, $data, $id); $this->println("updateBlob t=".$tablename." c=".$colname." id=".$id." status=".$result); return $result; } function updateBlobFile($tablename, $colname, $id, $filename) { $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename); $this->checkConnection(); $result = $this->database->UpdateBlobFile($tablename, $colname, $filename, $id); $this->println("updateBlobFile t=".$tablename." c=".$colname." id=".$id." f=".$filename." status=".$result); return $result; } /* ADODB converted * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') * { * if($this->dbType == "mysql") * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); * $this->lastsql = $sql; * * $this->checkConnection(); * $this->query_time = microtime(); * $result =& $this->database->limitQuery($sql,$start, $count); * $this->query_time = microtime() - $this->query_time; * $this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; //$this->println("ADODB limitQuery sql=".$sql." st=".$start." co=".$count); $log->debug(' limitQuery sql = '.$sql .' st = '.$start .' co = '.$count); $this->checkConnection(); $result =& $this->database->SelectLimit($sql,$count,$start); if(!$result) $this->checkError($msg.' Limit Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getOne($sql, $dieOnError=false, $msg='') * { * $this->log->info('Get One:' . $sql); * $this->checkConnection(); * if($this->dbType == "mysql"){ * $queryresult =& $this->query($sql, $dieOnError, $msg); * $result =& mysql_result($queryresult,0); * } else { * $result =& $this->database->getOne($sql); * } * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); * return $result; * } */ function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); $this->checkConnection(); $result =& $this->database->GetOne($sql); if(!$result) $this->checkError($msg.' Get one Query Failed:' . $sql . '::', $dieOnError); return $result; } /* ADODB converted * function getFieldsArray(&$result) * { * $field_array = array(); * * if(! isset($result) || empty($result)) * { * return 0; * } * * if($this->dbType == "mysql") * { * $i = 0; * while ($i < mysql_num_fields($result)) * { * $meta = mysql_fetch_field($result, $i); * * if (!$meta) * { * return 0; * } * * array_push($field_array,$meta->name); * * $i++; * } * } * else * { * $arr = tableInfo($result); * foreach ($arr as $index=>$subarr) * { * array_push($field_array,$subarr['name']); * } * } * * return $field_array; * } */ function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); $field_array = array(); if(! isset($result) || empty($result)) { return 0; } $i = 0; $n = $result->FieldCount(); while ($i < $n) { $meta = $result->FetchField($i); if (!$meta) { return 0; } array_push($field_array,$meta->name); $i++; } //$this->println($field_array); return $field_array; } /* ADODB Converted * function getRowCount(&$result) * { * if(isset($result) && !empty($result)) * if($this->dbType == "mysql"){ * return mysql_numrows($result); * } else { * return $result->numRows(); * } * return 0; * } */ function getRowCount(&$result){ global $log; //$this->println("ADODB getRowCount"); if(isset($result) && !empty($result)) $rows= $result->RecordCount(); //$this->println("ADODB getRowCount rows=".$rows); //$log->debug('getRowCount rows= '.$rows); return $rows; } /* ADODB newly added. replacement for mysql_num_rows */ function num_rows(&$result) { return $this->getRowCount($result); } /* ADODB newly added. replacement form mysql_num_fields */ function num_fields(&$result) { return $result->FieldCount(); } /* ADODB newly added. replacement for mysql_fetch_array() */ function fetch_array(&$result) { if($result->EOF) { //$this->println("ADODB fetch_array return null"); return NULL; } return $this->change_key_case($result->FetchRow()); } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); //Commented strip_selected_tags and added to_html function for HTML tags vulnerability //$coldata = strip_selected_tags($rowdata[$col],'script'); $coldata = to_html($rowdata[$col]); //$this->println("ADODB query_result ". $coldata); return $coldata; } /* ADODB Converted * function getAffectedRowCount(&$result) * { * if($this->dbType == "mysql"){ * return mysql_affected_rows(); * } * else { * return $result->affectedRows(); * } * return 0; * } */ function getAffectedRowCount(&$result) { global $log; //$this->println("ADODB getAffectedRowCount"); $log->debug('getAffectedRowCount'); $rows =$this->database->Affected_Rows(); //$this->println("ADODB getAffectedRowCount rows=".rows); $log->debug('getAffectedRowCount rows = '.$rows); return $rows; } /* ADODB converted * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ * $result = $this->query($sql, $dieOnError, $msg); * * if($this->getRowCount($result ) == 1) * return to_html($result, $encode); * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); * return ''; * } */ function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); if($this->getRowCount($result ) == 1) return $result; $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } /* ADODB converted * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) * { * if(isset($result) && $rowNum < 0) * { * if($this->dbType == "mysql"){ * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); * } * if($this->dbType == "mysql"){ * if($this->getRowCount($result) > $rowNum){ * mysql_data_seek($result, $rowNum); * } * $this->lastmysqlrow = $rowNum; * * $row = mysql_fetch_assoc($result); * * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); * if($encode) * return array_map('to_html', $row); * return $row; * } */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { //$this->println("ADODB fetchByAssoc ".$rowNum." fetch mode=".$adb->database->$ADODB_FETCH_MODE); if($result->EOF) { $this->println("ADODB fetchByAssoc return null"); return NULL; } if(isset($result) && $rowNum < 0) { $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); //$this->println("ADODB fetchByAssoc r< 0 isarray r=".is_array($row)." r1=".is_array($row[1])); //$this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); //$this->println("ADODB fetchByAssoc r< 0 not array r1=".$row[1]); return $row; } //$this->println("ADODB fetchByAssoc after if ".$rowNum); if($this->getRowCount($result) > $rowNum) { $result->Move($rowNum); } $this->lastmysqlrow = $rowNum; //srini - think about this $row = $this->change_key_case($result->GetRowAssoc(false)); $result->MoveNext(); //print_r($row); $this->println($row); if($encode&& is_array($row)) return array_map('to_html', $row); return $row; } /* ADODB converted * function getNextRow(&$result, $encode=true) * { * if(isset($result)){ * $row = $result->fetchRow(); * if($encode&& is_array($row)) * return array_map('to_html', $row); * return $row; * } * return null; * } */ function getNextRow(&$result, $encode=true){ global $log; //$this->println("ADODB getNextRow"); $log->info('getNextRow'); if(isset($result)){ $row = $this->change_key_case($result->FetchRow()); if($row && $encode&& is_array($row)) return array_map('to_html', $row); return $row; } return null; } function fetch_row(&$result, $encode=true) { return $this->getNextRow($result); } function field_name(&$result, $col) { return $result->FetchField($col); } function getQueryTime(){ return $this->query_time; } /* * function execute($stmt, $data, $dieOnError=false, $msg=''){ * $this->log->info('Executing:'.$stmt); * $this->checkConnection(); * $this->query_time = microtime(); * $prepared = $this->database->prepare($stmt); * $result = execute($stmt, $data); * $this->query_time = microtime() - $this->query_time; * //$this->log->info('Query Execution Time:'.$this->query_time); * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); * return $result; * } */ /* adodb converted * function connect($dieOnError = false){ * $this->println("connect"); * global $dbconfigoption; * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); * @mysql_select_db($this->dbName) or die( "Unable to select database"); * if(!$this->database){ * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); * if($this->connection == false && $dbconfigoption['persistent'] == true){ * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; * } * } * } * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); * if($this->checkError('Could Not Connect:', $dieOnError)) * $this->log->info("connected to db"); * * } */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); /* * $driver='mysql'; * $server='srinivasan'; * $user='root'; * $password=''; * $database='vtigercrm3_2'; * * $this->database = ADONewConnection($driver); * * #$this->database->debug = true; * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); */ /* * $this->dbHostName="srinivasan:1521"; * $this->userName="vt4"; * $this->userPassword="vt4"; * $this->dbName="srini"; * $this->dbType="oci8"; */ if(!isset($this->dbType)) { $this->println("ADODB Connect : DBType not specified"); return; } $this->database = ADONewConnection($this->dbType); //$this->database->debug = true; $this->database->PConnect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName); $this->database->LogSQL($this->enableSQLlog); //$this->database->SetFetchMode(ADODB_FETCH_ASSOC); //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } /* * function PearDatabase(){ * //$this->println("PearDatabase"); * global $currentModule; * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); * $this->resetSettings(); * } * * function resetSettings(){ * global $dbconfig, $dbconfigoption; * $this->disconnect(); * $this->setDatabaseType($dbconfig['db_type']); * $this->setUserName($dbconfig['db_username']); * $this->setUserPassword($dbconfig['db_password']); * $this->setDatabaseHost( $dbconfig['db_hostname']); * $this->setDatabaseName($dbconfig['db_name']); * $this->dbOptions = $dbconfigoption; * $this->enableSQLlog = ($dbconfig['log_sql'] == true); * //$this->println("resetSettings log=".$this->enableSQLlog); * //$this->println($dbconfig); * //if($this->dbType != "mysql"){ * // require_once( 'DB.php' ); * //} * } */ function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); global $currentModule; $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); $this->resetSettings($dbtype,$host,$dbname,$username,$passwd); } function resetSettings($dbtype,$host,$dbname,$username,$passwd) { global $dbconfig, $dbconfigoption; if($host == '') { $this->disconnect(); $this->setDatabaseType($dbconfig['db_type']); $this->setUserName($dbconfig['db_username']); $this->setUserPassword($dbconfig['db_password']); $this->setDatabaseHost( $dbconfig['db_hostname']); $this->setDatabaseName($dbconfig['db_name']); $this->dbOptions = $dbconfigoption; if($dbconfig['log_sql']) $this->enableSQLlog = ($dbconfig['log_sql'] == true); //$this->println("resetSettings log=".$this->enableSQLlog); //$this->println($dbconfig); /*if($this->dbType != "mysql"){ require_once( 'DB.php' ); }*/ } else { $this->disconnect(); $this->setDatabaseType($dbtype); $this->setDatabaseName($dbname); $this->setUserName($username); $this->setUserPassword($passwd); $this->setDatabaseHost( $host); } } function quote($string){ return $this->database->qstr($string); } /* ADODB converted * function disconnect() { * $this->println("disconnect"); * if(isset($this->database)){ * if($this->dbType == "mysql"){ * mysql_close($this->database); * } else { * $this->database->disconnect(); * } * unset($this->database); * } * } */ function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ if($this->dbType == "mysql"){ mysql_close($this->database); } else { $this->database->disconnect(); } unset($this->database); } } function setDebug($value) { $this->database->debug = $value; } // ADODB newly added methods function createTables($schemaFile, $dbHostName=false, $userName=false, $userPassword=false, $dbName=false, $dbType=false) { $this->println("ADODB createTables ".$schemaFile); if($dbHostName!=false) $this->dbHostName=$dbHostName; if($userName!=false) $this->userName=$userPassword; if($userPassword!=false) $this->userPassword=$userPassword; if($dbName!=false) $this->dbName=$dbName; if($dbType!=false) $this->dbType=$dbType; //$db = ADONewConnection($this->dbType); $this->checkConnection(); $db = $this->database; //$db->debug = true; //$this->println("ADODB createTables connect status=".$db->Connect($this->dbHostName, $this->userName, $this->userPassword, $this->dbName)); $schema = new adoSchema( $db ); //Debug Adodb XML Schema $sehema->XMLS_DEBUG = TRUE; //Debug Adodb $sehema->debug = true; $sql = $schema->ParseSchema( $schemaFile ); $this->println("--------------Starting the table creation------------------"); //$this->println($sql); //integer ExecuteSchema ([array $sqlArray = NULL], [boolean $continueOnErr = NULL]) $result = $schema->ExecuteSchema( $sql, true ); if($result) print $db->errorMsg(); // needs to return in a decent way $this->println("ADODB createTables ".$schemaFile." status=".$result); return $result; } function createTable($tablename, $flds) { $this->println("ADODB createTable table=".$tablename." flds=".$flds); $this->checkConnection(); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $dict = NewDataDictionary($this->database); $sqlarray = $dict->CreateTableSQL($tablename, $flds); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB createTable table=".$tablename." flds=".$flds." status=".$result); return $result; } function alterTable($tablename, $flds, $oper) { $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper); //$dict = NewDataDictionary(ADONewConnection($this->dbType)); $this->checkConnection(); $dict = NewDataDictionary($this->database); //$sqlarray = new Array(); if($oper == 'Add_Column') { $sqlarray = $dict->AddColumnSQL($tablename, $flds); } else if($oper == 'Delete_Column') { $sqlarray = $dict->DropColumnSQL($tablename, $flds); } $this->println("sqlarray"); $this->println($sqlarray); $result = $dict->ExecuteSQLArray($sqlarray); $this->println("ADODB alterTableTable table=".$tablename." flds=".$flds." oper=".$oper." status=".$result); return $result; } function getColumnNames($tablename) { $this->println("ADODB getColumnNames table=".$tablename); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); //$colNames = new Array(); $i=0; foreach($adoflds as $fld) { $colNames[$i] = $fld->name; $i++; } return $colNames; } function formatString($tablename,$fldname, $str) { //$this->println("ADODB formatString table=".$tablename." fldname=".$fldname." str=".$str); $this->checkConnection(); $adoflds = $this->database->MetaColumns($tablename); foreach ( $adoflds as $fld ) { //$this->println("ADODB formatString adofld =".$fld->name); if(strcasecmp($fld->name,$fldname)==0) { //$this->println("ADODB formatString fldname=".$fldname." fldtype =".$fld->type); $fldtype =strtoupper($fld->type); if(strcmp($fldtype,'CHAR')==0 || strcmp($fldtype,'VARCHAR') == 0 || strcmp($fldtype,'VARCHAR2') == 0 || strcmp($fldtype,'LONGTEXT')==0 || strcmp($fldtype,'TEXT')==0) { //$this->println("ADODB return else normal"); return $this->database->Quote($str); } else if(strcmp($fldtype,'DATE') ==0 || strcmp($fldtype,'TIMESTAMP')==0) { return $this->formatDate($str); } else { return $str; } } } $this->println("format String Illegal field name ".$fldname); return $str; } function formatDate($datetime) { $this->checkConnection(); //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); //if($db->dbType=='mysql') return $this->quote($date); return $date; } function getDBDateString($datecolname) { $this->checkConnection(); $db = &$this->database; $datestr = $db->SQLDate("Y-m-d, H:i:s" ,$datecolname); return $datestr; } function getUniqueID($seqname) { global $log; $this->checkConnection(); if( $this->dbType == "pgsql") { $keytab = $this->database->MetaPrimaryKeys($seqname); if( count( $keytab) > 0) { $log->info("PearDatabase: Postgres getUniqueID hack: ".$seqname."_".$keytab[0]."_seq"); return $this->database->GenID($seqname."_".$keytab[0]."_seq",1); } else { $log->info("PearDatabase: Problem: getUniqueID but no key for '$seqname'"); } } return $this->database->GenID($seqname."_seq",1); } function get_tables() { $this->checkConnection(); $result = & $this->database->MetaTables('TABLES'); $this->println($result); return $result; } } /* End of class */ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); ?> From dome at tel.co.th Thu May 3 07:40:59 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Thu, 3 May 2007 21:40:59 +0700 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503155634.A11877@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> <8ccbff060705030528o2060726bubec16bac21a09e87@mail.gmail.com> <20070503155634.A11877@Strawberry.COM> Message-ID: <8ccbff060705030740u1f6df32cjd133c656035acfe8@mail.gmail.com> Same problem. when create contact Fatal error: Call to a member function Move() on a non-object in /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 When create new note Warning: mktime() expects parameter 6 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1388 Warning: mktime() expects parameter 1 to be long, string given in /opt/lampp/htdocs/vtiger/include/utils/CommonUtils.php on line 1389 Setting->orgunit Fatal error: Call to undefined method OrgUnit::getListQuery() in /opt/lampp/htdocs/vtiger/include/utils/ListViewUtils.php on line 2388 Dome C. On 5/3/07, Jens Hamisch wrote: > > Hi, > > I've verfied the 5.1_jens PearDatabase.php to my running version > and found no differences. Could you please check the one attached to > this mail to the one you're testing against? > > Kind regards, > Jens Hamisch > > On Thu, May 03, 2007 at 07:28:02PM +0700, Dome Charoenyost wrote: > > Jens, > > I try to test your branch with lxampp 1.5.3a (php 5.1.4) > > found same error > > Fatal error: Call to a member function Move() on a non-object in > > /opt/lampp/htdocs/vtiger/include/database/PearDatabase.php on line 441 > > > > Please give me more information about php,postgresql version ? > > > > Dome C. > > > > On 5/3/07, Jens Hamisch wrote: > > > > > > Hi Enrico, > > > > > > my fixes adress syntactical postgres support only. However > > > yours also seems to improove performance. Is there any chance > > > to have both fixes implemented (@don,richie)? > > > > > > Jens > > > > > > > > > On Thu, May 03, 2007 at 04:36:53AM +0200, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > > > > > > Hi, > > > > > > > > > Since it is now clear that postgres is supported, the only thing would be > > > > > about Enrico's opinion of adb->query_results being resource wasting, which > > > > > is very important regardless of mysql or postgres use, Enrico, what are > > > > > you doing instead of using the query_results method? > > > > > > > > As already said: introduced some new functions, which fetch either > > > > one record (run_query_record() and run_query_field()) or all records > > > > (run_query_allrecords() and run_query_list()) and simply return the data. > > > > > > > > There are several result types: > > > > > > > > a) just one scalar: -> run_query_field($query,$fieldname) > > > > --> returns an scalar > > > > b) just one record: -> run_query_record($query) > > > > --> returns an associative array > > > > c) an list of scalars -> run_query_list($query,$fieldname) > > > > --> returns an array/list of scalars > > > > d) an list of records: -> run_query_allreords($query) > > > > --> returns an array/list of ass. arrays > > > > > > > > cu > > > > -- > > > > --------------------------------------------------------------------- > > > > Enrico Weigelt == metux IT service > > > > > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > > > fax: +49 36207 519932 email: contact at metux.de > > > > cellphone: +49 174 7066481 > > > > --------------------------------------------------------------------- > > > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > > > --------------------------------------------------------------------- > > > > _______________________________________________ > > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > > -- > > > > > > -------------------------------------------------------------------------------- > > > > > > s t r a w b e r r y e d v - s y s t e m e g m b h > > > > > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > > > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > > > SSSSS-----SSSSS > > > ---SSSSS--------- fon (+49 8171) 41805-0 > > > -----SSSSSSS----- fax (+49 8171) 41805-59 > > > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > > > SSSSS-----SSSSS mobil: (+49 172) 8104162 > > > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > > > SSSSSSSSS Jens Hamisch > > > > > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > > _______________________________________________ > > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > From weigelt at metux.de Thu May 3 09:24:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:24:44 +0200 Subject: [Vtigercrm-developers] [PATCH] new functions and some cleanups Message-ID: <20070503162443.GA22625@nibiru.local> Hi folks, here are some patches (against latest trunk), which introduce the new functions and so some cleanups. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- ## ## takes db_port directly from the request variable, since register_globals ## is disabled most times and deprecated. ## diff -ruN upstream-10823/install/4createConfigFile.php working/install/4createConfigFile.php --- upstream-10823/install/4createConfigFile.php 2007-05-03 17:42:54.000000000 +0200 +++ working/install/4createConfigFile.php 2007-05-03 17:53:31.000000000 +0200 @@ -58,11 +58,14 @@ else { $db_hostname = $_REQUEST['db_hostname']; - if($db_type == "pgsql") - $db_port = '5432'; - else - $db_port = '3306'; - } + switch($_REQUEST{'db_type'}) + { + case 'pgsql': $db_port = '5432'; break; + case 'mysql': $db_port = '3306'; break; + default: + throw new Exception("unsupported db_type: \""+$_REQUEST{'db_type'}."\""); + } + } } if (isset($_REQUEST['db_username']))$db_username = $_REQUEST['db_username']; ## ## fixes error w/ duplicated class definitions. not sure if this is really correct ;-O ## diff -ruN upstream-10823/modules/Calendar/Date.php working/modules/Calendar/Date.php --- upstream-10823/modules/Calendar/Date.php 2007-05-03 17:43:39.000000000 +0200 +++ working/modules/Calendar/Date.php 2007-05-03 17:53:31.000000000 +0200 @@ -9,7 +9,7 @@ * ********************************************************************************/ -class DateTime +class X_DateTime { var $second = '00'; var $minute = '00'; -------------- next part -------------- ## ## adds new functions to the PearDatabase class to come around the whole ## broken query_result() idea ;-O ## diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 17:50:00.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:10:05.000000000 +0200 @@ -433,6 +433,144 @@ } return $this->change_key_case($result->FetchRow()); } + function run_query_record_html($query) + { + if (!is_array($rec = $this->run_query_record($query))) +// throw new Exception("no rec: $query"); + return $rec; + + foreach ($rec as $walk => $cur) + $r[$walk] = to_html($cur); + + return $r; + } + + function sql_quote($data) + { + if (is_array($data)) + { + switch($data{'type'}) + { + case 'text': + case 'numeric': + case 'integer': + case 'oid': + return $this->quote($data{'value'}); + break; + case 'timestamp': + return $this->formatDate($data{'value'}); + break; + default: + throw new Exception("unhandled type: ".serialize($cur)); + } + } + else + return $this->quote($data); + } + + function sql_insert_data($table, $data) + { + if (!$table) + throw new Exception("missing table name"); + if (!is_array($data)) + throw new Exception("data must be an array"); + if (!count($table)) + throw new Exception("no data given"); + + $sql_fields = ''; + $sql_data = ''; + foreach($data as $walk => $cur) + { + $sql_fields .= ($sql_fields?',':'').$walk; + $sql_data .= ($sql_data?',':'').$this->sql_quote($cur); + } + + return 'INSERT INTO '.$table.' ('.$sql_fields.') VALUES ('.$sql_data.')'; + } + + function run_insert_data($table,$data) + { + $query = $this->sql_insert_data($table,$data); + $res = $this->query($query); + $this->query("commit;"); + } + + function run_query_record($query) + { + $result = $this->query($query); + if (!$result) + return; +// throw new Exception("empty result !"); + + if (!is_object($result)) + throw new Exception("query \"$query\" failed: ".serialize($result)); + $res = $result->FetchRow(); + $rowdata = $this->change_key_case($res); + return $rowdata; + } + + function run_query_allrecords($query) + { + $result = $this->query($query); + $records = array(); + $sz = $this->num_rows($result); + for ($i=0; $i<$sz; $i++) + $records[$i] = $this->change_key_case($result->FetchRow()); + return $records; + } + + function run_query_field($query,$field) + { + $rowdata = $this->run_query_record($query); + return $rowdata{$field}; + } + + function run_query_list($query,$field) + { + $records = $this->run_query_allrecords($query); + foreach($records as $walk => $cur) + $list[] = $cur{$field}; + } + + function run_query_field_html($query,$field) + { + return to_html($this->run_query_field($query,$field)); + } + + function result_get_next_record($result) + { + return $this->change_key_case($result->FetchRow()); + } + + // create an IN expression from an array/list + function sql_expr_datalist($a) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur); + + return ' ( '.$l.' ) '; + } + + // create an IN expression from an record list, take $field within each record + function sql_expr_datalist_from_records($a,$field) + { + if (!is_array($a)) + throw new Exception("not an array"); + if (!$field) + throw new Exception("missing field"); + if (!count($a)) + throw new Exception("empty arrays not allowed"); + + foreach($a as $walk => $cur) + $l .= ($l?',':'').$this->quote($cur{$field}); + + return ' ( '.$l.' ) '; + } /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) -------------- next part -------------- diff -ruN cleaned/include/database/PearDatabase.php working/include/database/PearDatabase.php --- cleaned/include/database/PearDatabase.php 2007-05-03 18:13:24.000000000 +0200 +++ working/include/database/PearDatabase.php 2007-05-03 18:17:22.000000000 +0200 @@ -104,46 +104,6 @@ $this->println("TRANS Completed"); } -/* ADODB converted - * function checkError($msg='', $dieOnError=false) - * { - * if($this->dbType == "mysql") - * { - * if (mysql_errno()) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal("MySQL error ".mysql_errno().": ".mysql_error()); - * die ($msg."MySQL error ".mysql_errno().": ".mysql_error()); - * } else { - * $this->log->error("MySQL error ".mysql_errno().": ".mysql_error()); - * } - * return true; - * } - * return false; - * } - * else - * { - * if(!isset($this->database)) - * { - * $this->log->error("Database Is Not Connected"); - * return true; - * } - * if(DB::isError($this->database)) - * { - * if($this->dieOnError || $dieOnError) - * { - * $this->log->fatal($msg.$this->database->getMessage()); - * die ($msg.$this->database->getMessage()); - * } else { - * $this->log->error($msg.$this->database->getMessage()); - * } - * return true; - * } - * } - * return false; - * } - */ function checkError($msg='', $dieOnError=false) { @@ -160,7 +120,7 @@ * return true; * } */ - + if($this->dieOnError || $dieOnError) { $this->println("ADODB error ".$msg."->[".$this->database->ErrorNo()."]".$this->database->ErrorMsg()); @@ -268,24 +228,6 @@ return $result; } -/* ADODB converted - * function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') - * { - * if($this->dbType == "mysql") - * return $this->query("$sql LIMIT $start,$count", $dieOnError, $msg); - * $this->log->info('Limit Query:' . $sql. ' Start: ' .$start . ' count: ' . $count); - * $this->lastsql = $sql; - * - * $this->checkConnection(); - * $this->query_time = microtime(); - * $result =& $this->database->limitQuery($sql,$start, $count); - * $this->query_time = microtime() - $this->query_time; - * $this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function limitQuery($sql,$start,$count, $dieOnError=false, $msg='') { global $log; @@ -297,22 +239,6 @@ return $result; } -/* ADODB converted - * function getOne($sql, $dieOnError=false, $msg='') - * { - * $this->log->info('Get One:' . $sql); - * $this->checkConnection(); - * if($this->dbType == "mysql"){ - * $queryresult =& $this->query($sql, $dieOnError, $msg); - * $result =& mysql_result($queryresult,0); - * } else { - * $result =& $this->database->getOne($sql); - * } - * $this->checkError($msg.' Get One Failed:' . $sql . '::', $dieOnError); - * return $result; - * } - */ - function getOne($sql, $dieOnError=false, $msg='') { $this->println("ADODB getOne sql=".$sql); @@ -322,46 +248,6 @@ return $result; } -/* ADODB converted - * function getFieldsArray(&$result) - * { - * $field_array = array(); - * - * if(! isset($result) || empty($result)) - * { - * return 0; - * } - * - * if($this->dbType == "mysql") - * { - * $i = 0; - * while ($i < mysql_num_fields($result)) - * { - * $meta = mysql_fetch_field($result, $i); - * - * if (!$meta) - * { - * return 0; - * } - * - * array_push($field_array,$meta->name); - * - * $i++; - * } - * } - * else - * { - * $arr = tableInfo($result); - * foreach ($arr as $index=>$subarr) - * { - * array_push($field_array,$subarr['name']); - * } - * } - * - * return $field_array; - * } - */ - function getFieldsArray(&$result) { //$this->println("ADODB getFieldsArray"); @@ -586,19 +472,6 @@ return $coldata; } -/* ADODB Converted - * function getAffectedRowCount(&$result) - * { - * if($this->dbType == "mysql"){ - * return mysql_affected_rows(); - * } - * else { - * return $result->affectedRows(); - * } - * return 0; - * } - */ - function getAffectedRowCount(&$result) { global $log; @@ -610,17 +483,6 @@ return $rows; } -/* ADODB converted - * function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true){ - * $result = $this->query($sql, $dieOnError, $msg); - * - * if($this->getRowCount($result ) == 1) - * return to_html($result, $encode); - * $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); - * return ''; - * } - */ - function requireSingleResult($sql, $dieOnError=false,$msg='', $encode=true) { $result = $this->query($sql, $dieOnError, $msg); @@ -630,40 +492,6 @@ $this->log->error('Rows Returned:'. $this->getRowCount($result) .' More than 1 row returned for '. $sql); return ''; } - - -/* ADODB converted - * function fetchByAssoc(&$result, $rowNum = -1, $encode=true) - * { - * if(isset($result) && $rowNum < 0) - * { - * if($this->dbType == "mysql"){ - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC); - * } - * if($this->dbType == "mysql"){ - * if($this->getRowCount($result) > $rowNum){ - * mysql_data_seek($result, $rowNum); - * } - * $this->lastmysqlrow = $rowNum; - * - * $row = mysql_fetch_assoc($result); - * - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $rowNum); - * if($encode) - * return array_map('to_html', $row); - * return $row; - * } - */ function fetchByAssoc(&$result, $rowNum = -1, $encode=true) { @@ -703,20 +531,7 @@ return array_map('to_html', $row); return $row; } - -/* ADODB converted - * function getNextRow(&$result, $encode=true) - * { - * if(isset($result)){ - * $row = $result->fetchRow(); - * if($encode&& is_array($row)) - * return array_map('to_html', $row); - * return $row; - * } - * return null; - * } - */ - + function getNextRow(&$result, $encode=true){ global $log; @@ -744,69 +559,12 @@ function getQueryTime(){ return $this->query_time; } - -/* - * function execute($stmt, $data, $dieOnError=false, $msg=''){ - * $this->log->info('Executing:'.$stmt); - * $this->checkConnection(); - * $this->query_time = microtime(); - * $prepared = $this->database->prepare($stmt); - * $result = execute($stmt, $data); - * $this->query_time = microtime() - $this->query_time; - * //$this->log->info('Query Execution Time:'.$this->query_time); - * $this->checkError('Execute Failed:' . $stmt. '::', $dieOnError); - * return $result; - * } - */ - - -/* adodb converted - * function connect($dieOnError = false){ - * $this->println("connect"); - * global $dbconfigoption; - * if($this->dbType == "mysql" && $dbconfigoption['persistent'] == true){ - * $this->database =@mysql_pconnect($this->dbHostName,$this->userName,$this->userPassword); - * @mysql_select_db($this->dbName) or die( "Unable to select database"); - * if(!$this->database){ - * $this->connection = mysql_connect($this->dbHostName,$this->userName,$this->userPassword) or die("Could not connect to server ".$this->dbHostName." as ".$this->userName.".".mysql_error()); - * if($this->connection == false && $dbconfigoption['persistent'] == true){ - * $_SESSION['administrator_error'] = "Severe Performance Degradation: Persistent Database Connections not working. Please set \$dbconfigoption['persistent'] to false in your config.php file"; - * } - * } - * } - * else $this->database = DB::connect($this->getDataSourceName(), $this->dbOptions); - * if($this->checkError('Could Not Connect:', $dieOnError)) - * $this->log->info("connected to db"); - * - * } - */ function connect($dieOnError = false) { //$this->println("ADODB connect"); global $dbconfigoption,$dbconfig; //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); - -/* - * $driver='mysql'; - * $server='srinivasan'; - * $user='root'; - * $password=''; - * $database='vtigercrm3_2'; - * - * $this->database = ADONewConnection($driver); - * - * #$this->database->debug = true; - * $this->println("ADODB status=".$this->database->PConnect($server, $user, $password, $database)); - */ - -/* - * $this->dbHostName="srinivasan:1521"; - * $this->userName="vt4"; - * $this->userPassword="vt4"; - * $this->dbName="srini"; - * $this->dbType="oci8"; - */ if(!isset($this->dbType)) { @@ -823,32 +581,6 @@ //$this->println("ADODB type=".$this->dbType." host=".$this->dbHostName." dbname=".$this->dbName." user=".$this->userName." password=".$this->userPassword); } -/* - * function PearDatabase(){ - * //$this->println("PearDatabase"); - * global $currentModule; - * $this->log =& LoggerManager::getLogger('PearDatabase_'. $currentModule); - * $this->resetSettings(); - * } - * - * function resetSettings(){ - * global $dbconfig, $dbconfigoption; - * $this->disconnect(); - * $this->setDatabaseType($dbconfig['db_type']); - * $this->setUserName($dbconfig['db_username']); - * $this->setUserPassword($dbconfig['db_password']); - * $this->setDatabaseHost( $dbconfig['db_hostname']); - * $this->setDatabaseName($dbconfig['db_name']); - * $this->dbOptions = $dbconfigoption; - * $this->enableSQLlog = ($dbconfig['log_sql'] == true); - * //$this->println("resetSettings log=".$this->enableSQLlog); - * //$this->println($dbconfig); - * //if($this->dbType != "mysql"){ - * // require_once( 'DB.php' ); - * //} - * } - */ - function PearDatabase($dbtype='',$host='',$dbname='',$username='',$passwd='') { //$this->println("PearDatabase"); @@ -893,21 +625,6 @@ return $this->database->qstr($string); } - -/* ADODB converted - * function disconnect() { - * $this->println("disconnect"); - * if(isset($this->database)){ - * if($this->dbType == "mysql"){ - * mysql_close($this->database); - * } else { - * $this->database->disconnect(); - * } - * unset($this->database); - * } - * } - */ - function disconnect() { $this->println("ADODB disconnect"); if(isset($this->database)){ @@ -1054,7 +771,6 @@ //$db = ADONewConnection($this->dbType); $db = &$this->database; $date = $db->DBTimeStamp($datetime); - //if($db->dbType=='mysql') return $this->quote($date); return $date; } @@ -1083,6 +799,3 @@ $adb = new PearDatabase(); $adb->connect(); //$adb->database->setFetchMode(ADODB_FETCH_NUM); - - -?> From weigelt at metux.de Thu May 3 09:33:22 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:33:22 +0200 Subject: [Vtigercrm-developers] vtiger contribution question In-Reply-To: <20070503085427.A9675@Strawberry.COM> References: <530c7d700704291651q203506e6xe6addd84858a08ed@mail.gmail.com> <20070501175850.GB26224@nibiru.local> <530c7d700705011248gfcccf56wf22cf099fbab1aa7@mail.gmail.com> <20070501200552.GC26224@nibiru.local> <20070502082057.D16394@Strawberry.COM> <530c7d700705021213n30198868p2f1f7bd4b55ef846@mail.gmail.com> <20070503023653.GA29236@nibiru.local> <20070503085427.A9675@Strawberry.COM> Message-ID: <20070503163322.GB22625@nibiru.local> * Jens Hamisch schrieb: Hi Enrico, > my fixes adress syntactical postgres support only. I'll have a look at it. Could you please give me some quick cmdline to fetch it (I'm not really experienced w/ svn) or an patch against latest release or trunk ? > However yours also seems to improove performance. Is there any > chance to have both fixes implemented (@don,richie) ? Well, let's try it step by step :) I've posted a first set of patches some mins ago. They should not break anything, just add the new functions and clean up old comments, etc. Would be great if you could check them if they fit your branch. IMHO they should be good enough to get into upstream quickly. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Thu May 3 09:48:09 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 3 May 2007 18:48:09 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... Message-ID: <20070503164809.GA13215@nibiru.local> Hi folks, I've got lots of cases where PHP spits out an error message like: "Catchable fatal error: Object of class Accounts could not be converted to string in ....." This is triggered by the $log->debug() calls at the head of many functions, where an log message is cat'ed from the parameters. Obviously PHP does not know what to do with objects if they should be accessed as strings. No idea if there's an option for controlling that or whether it depends on the PHP version. For now I simply comment out these lines at my site, but that's proably not the solution. How can we cope with these cases ? Write an generic ObjToString() function which handles that (checks if its an object and then prints proper info, etc) or add an toString() method to all classes ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Thu May 3 11:03:14 2007 From: joe at tsolucio.com (Joe Bordes) Date: Thu, 03 May 2007 20:03:14 +0200 Subject: [Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ... In-Reply-To: <20070503164809.GA13215@nibiru.local> References: <20070503164809.GA13215@nibiru.local> Message-ID: <463A23E2.9000603@tsolucio.com> Hi, All entities (except Users) inherit from crmentity, so what I do is add the toString function in data/crmentity.php to avoid the error. Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > I've got lots of cases where PHP spits out an error message like: > > "Catchable fatal error: Object of class Accounts could not > be converted to string in ....." > > This is triggered by the $log->debug() calls at the head of many > functions, where an log message is cat'ed from the parameters. > Obviously PHP does not know what to do with objects if they > should be accessed as strings. No idea if there's an option for > controlling that or whether it depends on the PHP version. > > For now I simply comment out these lines at my site, but that's > proably not the solution. > > How can we cope with these cases ? > > Write an generic ObjToString() function which handles that > (checks if its an object and then prints proper info, etc) > or add an toString() method to all classes ? > > > cu > From weigelt at metux.de Fri May 4 07:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 4 May 2007 16:47:48 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! Message-ID: <20070504144747.GB14102@nibiru.local> Hi folks, I'm currently trying out the 5.1_jens branch. It seems really broken :(( a) I had to add __toString() methods to certain objects b) The getOrgUnits() function is missing. I couldn't find anything about it on the web. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Sat May 5 11:28:16 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Sat, 5 May 2007 20:28:16 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070504144747.GB14102@nibiru.local>; from Enrico Weigelt on Fri, May 04, 2007 at 04:47:48PM +0200 References: <20070504144747.GB14102@nibiru.local> Message-ID: <20070505202816.A19389@Strawberry.COM> Hi, I'm going to have a look at this. The branch is just a copy of the definitely productive version I'm running here. Is there any limit on your (personal) mailbox? I may send an TAR archive to you ... Jens On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I'm currently trying out the 5.1_jens branch. > It seems really broken :(( > > a) I had to add __toString() methods to certain objects > > b) The getOrgUnits() function is missing. I couldn't find anything > about it on the web. > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From dome at tel.co.th Sat May 5 14:11:07 2007 From: dome at tel.co.th (Dome Charoenyost) Date: Sun, 6 May 2007 04:11:07 +0700 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <8ccbff060705051411s2f06c50aufa1549505a3f018e@mail.gmail.com> send me please dome at tel.co.th Thanks Dome C. On 5/6/07, Jens Hamisch wrote: > > Hi, > > > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... > > > Jens > > > On Fri, May 04, 2007 at 04:47:48PM +0200, Enrico Weigelt wrote: > > > > Hi folks, > > > > > > I'm currently trying out the 5.1_jens branch. > > It seems really broken :(( > > > > a) I had to add __toString() methods to certain objects > > > > b) The getOrgUnits() function is missing. I couldn't find anything > > about it on the web. > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -- > > -------------------------------------------------------------------------------- > > s t r a w b e r r y e d v - s y s t e m e g m b h > > SSSSSSSSS Am Flosskanal 7 Jens Hamisch > SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO > SSSSS-----SSSSS > ---SSSSS--------- fon (+49 8171) 41805-0 > -----SSSSSSS----- fax (+49 8171) 41805-59 > ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com > SSSSS-----SSSSS mobil: (+49 172) 8104162 > SSSSSSSSSSSSS Geschaeftsfuehrer/CEO > SSSSSSSSS Jens Hamisch > > a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From weigelt at metux.de Sun May 6 08:54:04 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Sun, 6 May 2007 17:54:04 +0200 Subject: [Vtigercrm-developers] 5.1_jens branch broken ! In-Reply-To: <20070505202816.A19389@Strawberry.COM> References: <20070504144747.GB14102@nibiru.local> <20070505202816.A19389@Strawberry.COM> Message-ID: <20070506155404.GA18277@nibiru.local> * Jens Hamisch schrieb: Hi, > I'm going to have a look at this. The branch is just a copy > of the definitely productive version I'm running here. > > Is there any limit on your (personal) mailbox? I may send > an TAR archive to you ... Okay, go ahead :) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 05:57:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 14:57:28 +0200 Subject: [Vtigercrm-developers] 1/2 OT: diff + skip files Message-ID: <20070507125728.GA999@nibiru.local> Hi folks, could anyone give me an tip how to skip certain files on diff ? I'm currently merging jens' personal copy with the 5.1_jens branch from SVN and there are lots of autogenerated files, which should be skipped (to reduce manual work on the diffs). cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Mon May 7 06:01:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 7 May 2007 15:01:49 +0200 Subject: [Vtigercrm-developers] jens' tree vs 5.1_jens Message-ID: <20070507130149.GB999@nibiru.local> Hi folks, Jens has sent me his personal tree (which he considered stable). There're a lot of differences to the 5.1_jens branch in SVN. I'm currently working on merging his changes and putting them into a couple of patch files. Would be great if they'd go into SVN very soon. In the next step we should merge this branch with the current trunk. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 11:00:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 20:00:41 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount Message-ID: <20070508180041.GA4205@nibiru.local> Hi folks, while just filing an invoice, I got into big trouble: It refuses non-integer amounts ! For service billing this is really bad. You can't assume, all works are done in an hourly raster. How can I fix this ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Tue May 8 11:47:20 2007 From: joe at tsolucio.com (Joe Bordes) Date: Tue, 08 May 2007 20:47:20 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <20070508180041.GA4205@nibiru.local> References: <20070508180041.GA4205@nibiru.local> Message-ID: <4640C5B8.2010601@tsolucio.com> Hi, Look in the forums/wiki, it has something to do with changing the type of a field in vtiger_inventoryproductrel Joe TSolucio Enrico Weigelt escribi?: > Hi folks, > > > while just filing an invoice, I got into big trouble: > It refuses non-integer amounts ! > > For service billing this is really bad. You can't assume, all > works are done in an hourly raster. > > How can I fix this ? > > > cu > From weigelt at metux.de Tue May 8 12:01:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:01:07 +0200 Subject: [Vtigercrm-developers] [BUG] invoice module refuses non-integer amount In-Reply-To: <4640C5B8.2010601@tsolucio.com> References: <20070508180041.GA4205@nibiru.local> <4640C5B8.2010601@tsolucio.com> Message-ID: <20070508190106.GA17322@nibiru.local> * Joe Bordes schrieb: Hi, > Look in the forums/wiki, it has something to do with changing > the type of a field in vtiger_inventoryproductrel why the hell the quantity an int instead of numeric ?! In which places do I have to change it to fix it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:34:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:34:33 +0200 Subject: [Vtigercrm-developers] RFC: schema versioning Message-ID: <20070508193433.GB17322@nibiru.local> Hi folks, as some of you probably might have realized that upgrading database schema is an very tricky issue. I don't believe that an universal schema generator and updater, which really *WORKS* can be built with reasonable effort, at least not if the RDBMS should not just be abused as spreadsheet storage. The various RDBMS'es *are* different and so require different schemata. The big problem is not writing proper SQL commands, but keeping track of current schema version and find the right commands for update. So my suggestion: * add an new table "schema_version" which contains an list of schema components (identified by some unique name) and their current version (which is an sequential number). * schema updates are done, for each component separately, strictly sequential. each RDBMS has its own SQL scripts. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:41:33 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:41:33 +0200 Subject: [Vtigercrm-developers] [BUG] Invoice: Disturbing noise when w/ multiple articles of same type Message-ID: <20070508194133.GC17322@nibiru.local> Hi folks, why does it give this disturbing noise when putting multiple artiles of the same type on one invoice ? For services this is really ugly. Obviously you don't have an separate product for every little piece you've done for the customer. The article is simply working time, amount of "1" means 1 hour ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:48:03 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:48:03 +0200 Subject: [Vtigercrm-developers] Requesting trac access Message-ID: <20070508194803.GD17322@nibiru.local> Hi folks, as I'm currenly discovering lots of bugs, I'd like to get trac access to file them there. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 12:52:46 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 21:52:46 +0200 Subject: [Vtigercrm-developers] [BUG] cannot change my company name Message-ID: <20070508195245.GE17322@nibiru.local> Hi folks, I cannot change my company name. No matter what I do, it remains "vtiger". How can I get this fixed ASAP ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Tue May 8 13:25:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 8 May 2007 22:25:20 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! Message-ID: <20070508202520.GF17322@nibiru.local> This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From gharris at teamexpansion.org Tue May 8 13:41:06 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 16:41:06 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> Message-ID: Who in the world are you and why are you cursing all over the place!!!! Thanks, Greg Harris ---------- Original Message ---------- FROM: Enrico Weigelt TO: vtiger support DATE: Tue, 8 May 2007 22:25:20 +0200 SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! This can't serious: self modificating code ! Why the hell isn't that stuff stored in the RDBMS ?! -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From jorge.torres.maldonado at gmail.com Tue May 8 13:49:54 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Tue, 8 May 2007 16:49:54 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: References: <20070508202520.GF17322@nibiru.local> Message-ID: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Hi, I believe BUG reporting is very important, no matter who in planet one may be. Cheers, On 5/8/07, Greg Harris wrote: > > Who in the world are you and why are you cursing all over the place!!!! > > Thanks, > > Greg Harris > > > > ---------- Original Message ---------- > > FROM: Enrico Weigelt > TO: vtiger support > DATE: Tue, 8 May 2007 22:25:20 +0200 > > SUBJECT: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! > > > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/d8b9195b/attachment-0003.html From gharris at teamexpansion.org Tue May 8 14:13:00 2007 From: gharris at teamexpansion.org (Greg Harris) Date: Tue, 8 May 2007 17:13:00 -0400 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <530c7d700705081349n3c37c4dal19b8e1f365db3c07@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070508/a8cdeb4d/attachment-0005.html From tzenk at gmx.net Tue May 8 15:40:10 2007 From: tzenk at gmx.net (Torsten Zenk) Date: Wed, 09 May 2007 00:40:10 +0200 Subject: [Vtigercrm-developers] CustomInvoiceNo.php -> what the hell ?! In-Reply-To: <20070508202520.GF17322@nibiru.local> References: <20070508202520.GF17322@nibiru.local> Message-ID: <4640FC4A.1050703@gmx.net> Yeah, Bug reporting in a neutral way is very important, but we don?t need any personal emotions in a bug report, so wether it is ...what the hell....or it is.....who are you...just report and keep your emotions for the forum and your wife ;) Torsten Enrico Weigelt schrieb: > This can't serious: self modificating code ! > > Why the hell isn't that stuff stored in the RDBMS ?! > > From gopals at vtiger.com Tue May 8 19:20:11 2007 From: gopals at vtiger.com (Gopal) Date: Wed, 09 May 2007 07:50:11 +0530 Subject: [Vtigercrm-developers] Requesting trac access In-Reply-To: <20070508194803.GD17322@nibiru.local> References: <20070508194803.GD17322@nibiru.local> Message-ID: <46412FDB.9080001@vtiger.com> Hi, I've enabled trac access for you. Shortly you will receive login details in a separate mail. URL: http://vtiger.fosslabs.com Regards, Gopal Enrico Weigelt wrote: > Hi folks, > > as I'm currenly discovering lots of bugs, I'd like to get trac > access to file them there. > > cu > From weigelt at metux.de Wed May 9 04:27:30 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:27:30 +0200 Subject: [Vtigercrm-developers] RFC: add function getCurrentOrgDetails() Message-ID: <20070509112730.GA16156@nibiru.local> Hi folks, there are several points where the information of the current organisation is retrieved on pedestrian ways (several SQL queries, object creations, etc). Such things are an good place for bugs, so we should reduce them as much as possible. So I suggest introducing an new function "getEntityOrgDetails()", which retrieves that information by the given $crmid. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 04:28:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:28:41 +0200 Subject: [Vtigercrm-developers] TeX printing Message-ID: <20070509112841.GB16156@nibiru.local> Hi folks, is anyone working on TeX based printing (ie. Invoices) ? Otherwise I'll take care of it. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 04:42:40 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 13:42:40 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org Message-ID: <20070509114240.GC16156@nibiru.local> Hi folks, could anyone please explain what the table vtiger_entity2org actually is for ? As far as I understood it, we map the entities (ie. users are entities ?) to the organisation. Now I wonder if an entity can be associated to more than one organisation. If not, it's trivial to move that information directly to the entity's record and skip (maybe drop) this table. BTW: AFAIK we use the org's *NAME* here, not the (numerical) ID or some unique ident. That's a really bad idea, ie. makes changing the org name very, very complicated. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 05:06:21 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:06:21 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509112841.GB16156@nibiru.local> References: <20070509112841.GB16156@nibiru.local> Message-ID: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> I was thinking more about a wiki style On 5/9/07, Enrico Weigelt wrote: > > > Hi folks, > > > is anyone working on TeX based printing (ie. Invoices) ? > Otherwise I'll take care of it. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/18ddd9ce/attachment-0005.html From weigelt at metux.de Wed May 9 05:12:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 14:12:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> Message-ID: <20070509121210.GA28731@nibiru.local> * Jorge Torres schrieb: > I was thinking more about a wiki style How can it assist in rendering high quality preprints ? Is there any good rendering engine for this out there we can use ? The wiki syntax is good for easy editing of hypertext, but driving an print from db content is an completely different issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 05:49:32 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 08:49:32 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509121210.GA28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> Message-ID: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Enrico, You are right, latex is about high quality prints, still you have to make a document class for what you want and so on, and I dont know a way about extracting db content from latex, I thought that (extracting db contents) could be easier achieved in a wiki syntax way, and precisely because of wiki's "easy-fast editing" it would be perfect for end user applications. Also wiki to xml shouldn't be that complicated, having data in XML; a XSL template can be very simple to describe (much more easier than latex class), there are xsl "rendering" functions for php; the result of xsl(xml) could be html, so you can either send it to the web browser or you can "html to pdf" which is straight forward in php. What do you think? On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > I was thinking more about a wiki style > > How can it assist in rendering high quality preprints ? > Is there any good rendering engine for this out there we can use ? > > The wiki syntax is good for easy editing of hypertext, but driving > an print from db content is an completely different issue. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/85d38641/attachment-0003.html From jorge.torres.maldonado at gmail.com Wed May 9 06:00:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:00:24 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> Message-ID: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Enrico, Wait, Now that I think about it, it would be easier to just have vtiger to outputs a printing configuration form in which one textarea has an xml data structure of information that wants to be printed (say "invoice"), then another textarea for your xsl. If so; the only thing one should do, is to describe a xsl template for that xml structure, save, and that's it, next time you want to print, what vtiger would do is to "render" that information, as explained in my last email. Cheers, Jorge On 5/9/07, Jorge Torres wrote: > > Enrico, > > You are right, latex is about high quality prints, still you have to make > a document class for what you want and so on, and I dont know a way about > extracting db content from latex, I thought that (extracting db contents) > could be easier achieved in a wiki syntax way, and precisely because of > wiki's "easy-fast editing" it would be perfect for end user applications. > Also wiki to xml shouldn't be that complicated, having data in XML; a XSL > template can be very simple to describe (much more easier than latex class), > there are xsl "rendering" functions for php; the result of xsl(xml) could be > html, so you can either send it to the web browser or you can "html to pdf" > which is straight forward in php. > > What do you think? > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Jorge Torres schrieb: > > > I was thinking more about a wiki style > > > > How can it assist in rendering high quality preprints ? > > Is there any good rendering engine for this out there we can use ? > > > > The wiki syntax is good for easy editing of hypertext, but driving > > an print from db content is an completely different issue. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/d40f8d56/attachment-0005.html From weigelt at metux.de Wed May 9 06:35:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:35:44 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <20070509133544.GC28731@nibiru.local> * Jorge Torres schrieb: Hi, > Wait, Now that I think about it, it would be easier to just > have vtiger to outputs a printing configuration form in which > one textarea has an xml data structure of information that > wants to be printed (say "invoice"), then another textarea > for your xsl. If so; the only thing one should do, is to > describe a xsl template for that xml structure, save, and > that's it, next time you want to print, what vtiger would > do is to "render" that information, as explained in my last email. Again, very complicated for user and coder. Why not just an option in the settings screen, where the user can select renderer and template, and maybe an additional template editing form ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 06:39:42 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 15:39:42 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509114240.GC16156@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 01:42:40PM +0200 References: <20070509114240.GC16156@nibiru.local> Message-ID: <20070509153942.B3824@Strawberry.COM> Hi, it can be assigned to more than one organization. There is a 'primary' column in the entity2org table which defines the primary organization - the one that really 'owns' the entity. Jens On Wed, May 09, 2007 at 01:42:40PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > could anyone please explain what the table vtiger_entity2org > actually is for ? > > As far as I understood it, we map the entities (ie. users are > entities ?) to the organisation. > > Now I wonder if an entity can be associated to more than one > organisation. If not, it's trivial to move that information > directly to the entity's record and skip (maybe drop) this table. > > > BTW: AFAIK we use the org's *NAME* here, not the (numerical) > ID or some unique ident. That's a really bad idea, ie. makes > changing the org name very, very complicated. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 06:44:00 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 15:44:00 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> Message-ID: <4641D020.60605@tsolucio.com> Hi, Why not use the merge system that is already in vtiger? I have enhanced the merge system based on forum code and I have added merge to SO very easily. Now my client can create word, openoffice or RTF documents using their favorite document processor as if they made any other template. What advantage is there in TeX? Joe TSolucio Jorge Torres escribi?: > Enrico, From weigelt at metux.de Wed May 9 06:45:37 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:45:37 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509153942.B3824@Strawberry.COM> References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> Message-ID: <20070509134537.GD28731@nibiru.local> * Jens Hamisch schrieb: Hi, > it can be assigned to more than one organization. > There is a 'primary' column in the entity2org table which defines the > primary organization - the one that really 'owns' the entity. hmm, meanwhile I've found some pieces of code (in the invoice module) which explicitly break if the we have more than one org per entity (AFAIK). So what's correct now ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 06:47:48 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 15:47:48 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <20070509134748.GE28731@nibiru.local> * Joe Bordes schrieb: Hi, > Why not use the merge system that is already in vtiger? Well, actually, I never heared about that. > What advantage is there in TeX? High quality preprints ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 06:49:45 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 09:49:45 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641D020.60605@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> Message-ID: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Sounds great, but i dont get how is it that you get DB info from client's, word, openoffice. Thanks, Jorge On 5/9/07, Joe Bordes wrote: > > Hi, > > Why not use the merge system that is already in vtiger? > I have enhanced the merge system based on forum code and I have added > merge to SO very easily. Now my client can create word, openoffice or > RTF documents using their favorite document processor as if they made > any other template. > What advantage is there in TeX? > > Joe > TSolucio > > Jorge Torres escribi?: > > Enrico, > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/850e0d7c/attachment-0003.html From jens at Strawberry.COM Wed May 9 07:00:11 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 16:00:11 +0200 Subject: [Vtigercrm-developers] understanding vtiger_entity2org In-Reply-To: <20070509134537.GD28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 03:45:37PM +0200 References: <20070509114240.GC16156@nibiru.local> <20070509153942.B3824@Strawberry.COM> <20070509134537.GD28731@nibiru.local> Message-ID: <20070509160011.E3824@Strawberry.COM> Hi, do you have some more detailed information on that? Could be either a bug or something missed in the port of my changes to 5.0.3. Jens On Wed, May 09, 2007 at 03:45:37PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > Hi, > > > it can be assigned to more than one organization. > > There is a 'primary' column in the entity2org table which defines the > > primary organization - the one that really 'owns' the entity. > > hmm, meanwhile I've found some pieces of code (in the invoice module) > which explicitly break if the we have more than one org per > entity (AFAIK). > > So what's correct now ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 07:02:21 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:02:21 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> Message-ID: <20070509140221.GF28731@nibiru.local> * Jorge Torres schrieb: Hi, > Sounds great, but i dont get how is it that you get DB info > from client's, word, openoffice. Are we still talking about the same thing ? I'm working on invoice pdf rendering, which is entirely done on the server. Other formats, ie. OO could be generated the same way. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jorge.torres.maldonado at gmail.com Wed May 9 07:16:48 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 10:16:48 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Enrico, Yes, from I want it to do it from server side. It seems that I don't get what this merge system does, I understood from Jen's suggestion: that users could work their templates at client side, is this correct?, if so, how would they get DB data or data content structure from clients editor. Rendering setup Option in settings screen as Enrico mentioned would be perfect. On 5/9/07, Enrico Weigelt wrote: > > * Jorge Torres schrieb: > > Hi, > > > Sounds great, but i dont get how is it that you get DB info > > from client's, word, openoffice. > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/c1f5479b/attachment-0004.html From weigelt at metux.de Wed May 9 07:23:28 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:23:28 +0200 Subject: [Vtigercrm-developers] organization ident Message-ID: <20070509142328.GH28731@nibiru.local> Hi folks, I've found an big-fat problem with the organization modeling in the DB: The org is always referenced by its name ! To be clear: its the *printable* name, which appears for example on the bill. So now it's clear, why it cannot be changed in the settings ;-O It appears the name is also abused as ident, which is the key problem. There's no additional ID here. To fix this, we have two options: a) Add an numerical ID to the organization table and fix all the schema to reference on that. This would probably be the most clean model, but requires much care on schema updates. b) Add an new text field (ie. "official_name") which now carries the actual *name* (ie. for printing on the invoice) and leave evrything else untouched. Nearly trivial to implement, but maybe not very clean design. Comments ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Wed May 9 07:33:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 16:33:35 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <530c7d700705090716m81610cbha1dc6910810c5d32@mail.gmail.com> Message-ID: <20070509143335.GI28731@nibiru.local> * Jorge Torres schrieb: > if so, how would they get DB data or data content structure > from clients editor. Simply add some new button which calls the invoice rendering with an different engine / output format ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 07:59:10 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 16:59:10 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509140221.GF28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> Message-ID: <4641E1BE.80207@tsolucio.com> Yes, we are still talking about the same thing. Please take a look at the existng merge system for accounts. The idea is that you open up OO and write the template, where you want the contact name (for example) you put CONTACT_NAME and this gets substituted dynamically when you choose the template and the contact. If we add this feature to invoice, you could write your invoice in word and use INVOICE_NUMBER or INVOICE_DATE for example. That is basically what I have working. Joe TSolucio Enrico Weigelt escribi?: > * Jorge Torres schrieb: > > Hi, > > >> Sounds great, but i dont get how is it that you get DB info >> from client's, word, openoffice. >> > > Are we still talking about the same thing ? > > I'm working on invoice pdf rendering, which is entirely done on > the server. Other formats, ie. OO could be generated the same way. > > > cu > From weigelt at metux.de Wed May 9 08:12:19 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:12:19 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <4641E1BE.80207@tsolucio.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> Message-ID: <20070509151219.GJ28731@nibiru.local> * Joe Bordes schrieb: Hi, > Please take a look at the existng merge system for accounts. Where is it ? > The idea is that you open up OO and write the template, where you want > the contact name (for example) you put CONTACT_NAME and this gets > substituted dynamically when you choose the template and the contact. > If we add this feature to invoice, you could write your invoice in word > and use INVOICE_NUMBER or INVOICE_DATE for example. Actually, I'm not interested in having to cope with blobs like OO, neither do I have anything to do w/ M$ crap. That's totally irrelevant to me. All I want is that the already existing pdf generation stuff produces an high quality pdf preprint for my bills - w/o requiring any manual intervention. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Wed May 9 08:15:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 17:15:35 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509142328.GH28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 04:23:28PM +0200 References: <20070509142328.GH28731@nibiru.local> Message-ID: <20070509171535.F3824@Strawberry.COM> Hi, or opportunity c) handle organization and orgunit as yet another CRMEntities would be the best fit into the internal vtiger design for my point of view. The effort would be even more than just introducing an orgid (code-changes and cleanups), but from the maintainability point of view it would be a clear and straight forward solution. Jens On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > I've found an big-fat problem with the organization modeling in > the DB: > > The org is always referenced by its name ! > To be clear: its the *printable* name, which appears for example > on the bill. > > So now it's clear, why it cannot be changed in the settings ;-O > > It appears the name is also abused as ident, which is the key > problem. There's no additional ID here. > > To fix this, we have two options: > > a) Add an numerical ID to the organization table and fix all the > schema to reference on that. This would probably be the most > clean model, but requires much care on schema updates. > > b) Add an new text field (ie. "official_name") which now carries > the actual *name* (ie. for printing on the invoice) and leave > evrything else untouched. Nearly trivial to implement, but maybe > not very clean design. > > > > Comments ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From joe at tsolucio.com Wed May 9 08:26:50 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:26:50 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <4641E83A.2030603@tsolucio.com> Very good idea!! Joe TSolucio Jens Hamisch escribi?: > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities > > > would be the best fit into the internal vtiger design for my > point of view. > > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. > > > Jens > > > > On Wed, May 09, 2007 at 04:23:28PM +0200, Enrico Weigelt wrote: > >> Hi folks, >> >> >> I've found an big-fat problem with the organization modeling in >> the DB: >> >> The org is always referenced by its name ! >> To be clear: its the *printable* name, which appears for example >> on the bill. >> >> So now it's clear, why it cannot be changed in the settings ;-O >> >> It appears the name is also abused as ident, which is the key >> problem. There's no additional ID here. >> >> To fix this, we have two options: >> >> a) Add an numerical ID to the organization table and fix all the >> schema to reference on that. This would probably be the most >> clean model, but requires much care on schema updates. >> >> b) Add an new text field (ie. "official_name") which now carries >> the actual *name* (ie. for printing on the invoice) and leave >> evrything else untouched. Nearly trivial to implement, but maybe >> not very clean design. >> >> >> >> Comments ? >> >> cu >> -- >> --------------------------------------------------------------------- >> Enrico Weigelt == metux IT service >> >> phone: +49 36207 519931 www: http://www.metux.de/ >> fax: +49 36207 519932 email: contact at metux.de >> cellphone: +49 174 7066481 >> --------------------------------------------------------------------- >> -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- >> --------------------------------------------------------------------- >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> > > From jorge.torres.maldonado at gmail.com Wed May 9 08:28:10 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Wed, 9 May 2007 11:28:10 -0400 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509151219.GJ28731@nibiru.local> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> Message-ID: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Hi, I don't see why having other formats output support would be a problem, Jen's idea of having templates done in OO or others, is great; simply make your template on whatever editor you prefer, M$, OO, vi. upload and next time you generate invoices, buy orders, or as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, but I certainly want to see Jens work, where can I get it? Thanks, Jorge On 5/9/07, Enrico Weigelt wrote: > > * Joe Bordes schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the contact. > > If we add this feature to invoice, you could write your invoice in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070509/8a056c99/attachment-0004.html From weigelt at metux.de Wed May 9 08:27:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 17:27:49 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509171535.F3824@Strawberry.COM> References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> Message-ID: <20070509152749.GK28731@nibiru.local> * Jens Hamisch schrieb: > > Hi, > > > or opportunity > > c) handle organization and orgunit as yet another CRMEntities What does that exactly mean ? Schema change necessary for that ? > would be the best fit into the internal vtiger design for my > point of view. ACK. > The effort would be even more than just introducing an orgid > (code-changes and cleanups), but from the maintainability point > of view it would be a clear and straight forward solution. ACK. So: what has to be done for that ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From joe at tsolucio.com Wed May 9 08:39:01 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 09 May 2007 17:39:01 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> References: <20070509112841.GB16156@nibiru.local> <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <4641EB15.70205@tsolucio.com> http://forums.vtiger.com/viewtopic.php?t=14501 Jorge Torres escribi?: > Hi, > > I don't see why having other formats output support would be a > problem, Jen's idea of having templates done in OO or others, is > great; simply make your template on whatever editor you prefer, M$, > OO, vi. upload and next time you generate invoices, buy orders, or > as the case might be, you have it in pdf, M$, OO, HTML, etc. I dont > know if those are Jen's plans, but I certainly want to see Jens > work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, *Enrico Weigelt* > wrote: > > * Joe Bordes > schrieb: > > Hi, > > > Please take a look at the existng merge system for accounts. > > Where is it ? > > > The idea is that you open up OO and write the template, where > you want > > the contact name (for example) you put CONTACT_NAME and this gets > > substituted dynamically when you choose the template and the > contact. > > If we add this feature to invoice, you could write your invoice > in word > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > Actually, I'm not interested in having to cope with blobs like OO, > neither do I have anything to do w/ M$ crap. That's totally > irrelevant to me. > > All I want is that the already existing pdf generation stuff > produces an high quality pdf preprint for my bills - w/o requiring > any manual intervention. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From jens at Strawberry.COM Wed May 9 09:02:37 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:02:37 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com>; from Jorge Torres on Wed, May 09, 2007 at 11:28:10AM -0400 References: <530c7d700705090506s14a4ebfayad2af6bbb698594@mail.gmail.com> <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> Message-ID: <20070509180237.G3824@Strawberry.COM> Hi, I'd prefer a solution that is more generic. The thing I'm not happy about is to introduce another dependency into vtiger. However if it becomes necessary, than I'd suggest to focus on more actual products than latex. OpenOffice and StarOffice both support the open document standard. I don't know if M$ will support it some day, too, but the office suites mentioned above both run on all operation systems. Finally those who just want to read and print an invoice may do not have to install the entire office suite. They may use the document viewers available. There's another thing I'm missing in vtiger: document management. vtiger's slogan is to reflect an entire customer life cycle. Today we have campains, quotes, sales-order and invoices. There are open issues like contracts and statements that are missing. But this is just a more or less 'technical' point of view. What about all the letters written to (and received from) a customer. This is also part of the life-cycle and therefor should be managed by vtiger. Thus: what we need is an interface to the office suites. And the logical consequence would be: All documents produced by vtiger should be based on the same standard as the documents managed by vtiger. Than it would be easy to manage self-produced documents as any other documents, too. My conclusion: Use the open document standard instead of latex. Jens On Wed, May 09, 2007 at 11:28:10AM -0400, Jorge Torres wrote: > Hi, > > I don't see why having other formats output support would be a problem, > Jen's idea of having templates done in OO or others, is great; simply make > your template on whatever editor you prefer, M$, OO, vi. upload and next > time you generate invoices, buy orders, or as the case might be, you > have it in pdf, M$, OO, HTML, etc. I dont know if those are Jen's plans, > but I certainly want to see Jens work, where can I get it? > > Thanks, > > Jorge > > > > On 5/9/07, Enrico Weigelt wrote: > > > > * Joe Bordes schrieb: > > > > Hi, > > > > > Please take a look at the existng merge system for accounts. > > > > Where is it ? > > > > > The idea is that you open up OO and write the template, where you want > > > the contact name (for example) you put CONTACT_NAME and this gets > > > substituted dynamically when you choose the template and the contact. > > > If we add this feature to invoice, you could write your invoice in word > > > and use INVOICE_NUMBER or INVOICE_DATE for example. > > > > Actually, I'm not interested in having to cope with blobs like OO, > > neither do I have anything to do w/ M$ crap. That's totally > > irrelevant to me. > > > > All I want is that the already existing pdf generation stuff > > produces an high quality pdf preprint for my bills - w/o requiring > > any manual intervention. > > > > > > cu > > -- > > --------------------------------------------------------------------- > > Enrico Weigelt == metux IT service > > > > phone: +49 36207 519931 www: http://www.metux.de/ > > fax: +49 36207 519932 email: contact at metux.de > > cellphone: +49 174 7066481 > > --------------------------------------------------------------------- > > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > > --------------------------------------------------------------------- > > _______________________________________________ > > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Wed May 9 09:06:40 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Wed, 9 May 2007 18:06:40 +0200 Subject: [Vtigercrm-developers] organization ident In-Reply-To: <20070509152749.GK28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 05:27:49PM +0200 References: <20070509142328.GH28731@nibiru.local> <20070509171535.F3824@Strawberry.COM> <20070509152749.GK28731@nibiru.local> Message-ID: <20070509180640.H3824@Strawberry.COM> Hi, regarding the schema: just introduce an organization ID and add a constraint to the CRMEntity table. (IMHO orgunit already has an orgunitid - w/o looking at the code). code changes are more complex: Mainly the Save methods have to be reviewed whether they may be reduced to the super class methods. Jens On Wed, May 09, 2007 at 05:27:49PM +0200, Enrico Weigelt wrote: > * Jens Hamisch schrieb: > > > > Hi, > > > > > > or opportunity > > > > c) handle organization and orgunit as yet another CRMEntities > > What does that exactly mean ? > Schema change necessary for that ? > > > would be the best fit into the internal vtiger design for my > > point of view. > > ACK. > > > The effort would be even more than just introducing an orgid > > (code-changes and cleanups), but from the maintainability point > > of view it would be a clear and straight forward solution. > > ACK. > > So: what has to be done for that ? > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Wed May 9 11:57:58 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 9 May 2007 20:57:58 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509180237.G3824@Strawberry.COM> References: <20070509121210.GA28731@nibiru.local> <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> Message-ID: <20070509185758.GM28731@nibiru.local> * Jens Hamisch schrieb: Hi, > I'd prefer a solution that is more generic. well, my approach is quite generic ;-p > The thing I'm not happy about is to introduce another > dependency into vtiger. Fearing dependencies is what makes projects really fat and unmaintainable. Mozilla is an good (bad) example for that ;P BTW: you don't need to have (la)tex. You can use some other renderer (ie. fpdf-based, plain html, ...) > However if it becomes necessary, than I'd suggest to focus > on more actual products than latex. Yes, Latex is quite old, but it's also quite, quite stable. Coding activity is no appropriate indicator on quality. > OpenOffice and StarOffice both support the open document standard. Nice. Do you expect me to have that blod installed+running just to get an pdf bill ? > I don't know if M$ will support it some day, too, but the office > suites mentioned above both run on all operation systems. Finally > those who just want to read and print an invoice may do not have > to install the entire office suite. They may use the document > viewers available. I do *not* want any bit in some $office_format. I just want to have my bills as pdf w/ *my* custom layout. Latex is an very proven approach. > There's another thing I'm missing in vtiger: document management. Ugh, that's another story ... > And the logical consequence would be: All documents produced by > vtiger should be based on the same standard as the documents managed > by vtiger. Than it would be easy to manage self-produced documents > as any other documents, too. Interface != Storage/Encoding/Format. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From javawaba at hotmail.com Wed May 9 17:14:27 2007 From: javawaba at hotmail.com (Jim Weir) Date: Wed, 09 May 2007 20:14:27 -0400 Subject: [Vtigercrm-developers] ?? Message-ID: how do I unsubscribe from this list? _________________________________________________________________ Catch suspicious messages before you open them?with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 From brett.hooker at roarz.com Wed May 9 20:24:05 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 10 May 2007 13:24:05 +1000 Subject: [Vtigercrm-developers] VT5 Outlook Plugin Development Questions Message-ID: <46429055.4080208@roarz.com> Team, Which version of VB is used to develop/maintain the VT5 Outlook Plugin? Is there wiki/starter on contributing to the VT5 Outlook Plugin? Thanks, Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/4d8fcdbc/attachment-0004.html From gopals at vtiger.com Wed May 9 21:48:25 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 10 May 2007 10:18:25 +0530 Subject: [Vtigercrm-developers] ?? In-Reply-To: References: Message-ID: <4642A419.3010003@vtiger.com> Hi, You can unsubscribe from the developer list at: http://lists.vtigercrm.com/mailman/listinfo/vtigercrm-developers Thanks, Gopal Jim Weir wrote: > how do I unsubscribe from this list? > > _________________________________________________________________ > Catch suspicious messages before you open them---with Windows Live > Hotmail. > http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/598fe713/attachment-0004.html From jens at Strawberry.COM Thu May 10 00:37:41 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Thu, 10 May 2007 09:37:41 +0200 Subject: [Vtigercrm-developers] TeX printing In-Reply-To: <20070509185758.GM28731@nibiru.local>; from Enrico Weigelt on Wed, May 09, 2007 at 08:57:58PM +0200 References: <530c7d700705090549w5b39a36ew3cd4e5b49cca11c9@mail.gmail.com> <530c7d700705090600k614d9b29k369eb427653c41db@mail.gmail.com> <4641D020.60605@tsolucio.com> <530c7d700705090649v3f95b4d8t7edb84f33645cc50@mail.gmail.com> <20070509140221.GF28731@nibiru.local> <4641E1BE.80207@tsolucio.com> <20070509151219.GJ28731@nibiru.local> <530c7d700705090828j44d0cf6ah7f27457bb2b52f7@mail.gmail.com> <20070509180237.G3824@Strawberry.COM> <20070509185758.GM28731@nibiru.local> Message-ID: <20070510093741.B7494@Strawberry.COM> Hi, > I do *not* want any bit in some $office_format. I just want to > have my bills as pdf w/ *my* custom layout. Latex is an very > proven approach. let's get back to the generic solution: (la)tex is not standard on Unix platforms, but (g|t|n)roff and tbl is! Those provide enough features to produce high quality formulars. And they do not intro- duce another prerequisite. I havn't had a look at what finally came into the 5.0.3 branch. But I already introduced different pdf templates for all organizations and orgunits ... > > There's another thing I'm missing in vtiger: document management. > > Ugh, that's another story ... > > > And the logical consequence would be: All documents produced by > > vtiger should be based on the same standard as the documents managed > > by vtiger. Than it would be easy to manage self-produced documents > > as any other documents, too. > > Interface != Storage/Encoding/Format. Agree. A document management should be capable of handling any format of a document, so Office docs, scans and also latex would not contradict to the document management approach. However, to get more things covered office would be the first choice, because to create letters out of a vtiger attached document management, we need an interface to the office suite (which of course could be simply the creation of a base document that becomes opened). Having this interface, we have evverything at hand to simply create any formular w/o interfacing to yet another monstrum of third party software (which latex definitely is!). Also the latex approach is even more complex, because the templates themselfes prerequisite according latex extensions to be installed (at least may!). In comparison the office suites are monolithic and therefor complete. And finally: latex was and will be forever a system used by some experts. It is not addressed to people thout programming skills. I'm afraid it will not be possible to hand over the template definition to one of your sales and marketing people if it is based on latex. Office keeps this door open ... Jens -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From kenlyle at yahoo.com Thu May 10 07:12:38 2007 From: kenlyle at yahoo.com (Ken Lyle) Date: Thu, 10 May 2007 07:12:38 -0700 (PDT) Subject: [Vtigercrm-developers] Document Management In-Reply-To: Message-ID: <448400.55472.qm@web36405.mail.mud.yahoo.com> I have attended a few webinars from Alfresco, and they seem to have a good open source document management and web content management system. I have the impression that they are very standards compliant, like WebDAV, and something that makes their repository show up as a shared drive, and have some cool toys like rules that do automatic format conversions, say of each .doc to a PDF for the archive version. It seems like it should be only a 'loose dependency', which might make everyone happy. And, for the merging itself, maybe can use GoogleApps, or ThinkFree, or one of the free web suites that will save to .doc, .pdf, etc. That seems like a dependency that actually liberates the developers, the users, and their IT staffs from deploying software. Maybe you wizards can run with one of these ideas... Ken Think bigger than 'left' vs. 'right'- basic freedoms are under attack- http://www.healthfreedomusa.org/index.php/?cat=2 From weigelt at metux.de Thu May 10 08:19:20 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:19:20 +0200 Subject: [Vtigercrm-developers] [PATCH] 5.1_jens vs. jens' private Message-ID: <20070510151920.GA25395@nibiru.local> Hi folks, here's a bunch of patches between the 5.1_jens branch and jens's private tree, cleaned up a little bit. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/database/Postgres8.php htdocs/include/database/Postgres8.php --- orig/include/database/Postgres8.php 2007-05-04 16:11:49.000000000 +0200 +++ htdocs/include/database/Postgres8.php 2007-05-07 14:23:49.000000000 +0200 @@ -1,144 +1,144 @@ -info( "fixPostgresQuery: ".$query); - - // If we already have an order or group cluase separate ist for later use - if( strpos($queryRecord,'GROUP') > 0) - { - $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); - if( strpos($groupClause,'ORDER') > 0) - { - $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); - $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); - } - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); - } - - if( strpos($queryRecord,'ORDER') > 0) - { - $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); - $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); - } - - // Construkt the privateGroupList from the filed list by separating combined - // record.field entries - $privateGroupList = array(); - $token = strtok( $queryFields, ", () "); - while( $token !== false) { - if( strpos( $token, ".") !== false) { - array_push( $privateGroupList, $token); - } - $token = strtok( ", () "); - } - sort( $privateGroupList); - $groupFields = ""; - $last = ""; - for( $i = 0; $i < count($privateGroupList); $i++) { - if( $last != $privateGroupList[$i]) { - if( $groupFields == "") - $groupFields = $privateGroupList[$i]; - else - $groupFields .= ",".$privateGroupList[$i]; - } - $last = $privateGroupList[$i]; - } - - // Rebuild the query - $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; - if( $groupClause != "" ) - $groupClause = $groupClause.",".$groupFields; - else - $groupClause = $groupFields; - $query .= expandStar($groupClause,$log)." ".$orderClause; - - if( $debug) - $log->info( "fixPostgresQuery result: ".$query); - - return( $query); -} - -// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause -function expandStar($fieldlist,$log) -{ - $expanded=""; - $field = strtok( $fieldlist, ","); - while( $field != "") - { - //remove leading and trailing spaces - $field = trim( $field); - - //still spaces in the field indicate a complex structure - if( strpos( $field, " ") == 0) - { - - //locate table- and fieldname - $pos = strpos( $field, "."); - if( $pos > 0) - { - $table = substr( $field, 0, $pos); - $subfield = substr( $field, $pos+1, strlen($field)-$pos); - - //do we need to expand? - if( $subfield == "*") - $field = expandRecord($table,$log); - } - - //add the propably expanded field to the querylist - if( $expanded == "") - $expanded = $field; - else - $expanded .= ",".$field; - } - - //next field - $field = strtok(","); - } - - //return the expanded fieldlist - return( $expanded); -} - -//return an expanded table field list -function expandRecord($table,$log) -{ +info( "fixPostgresQuery: ".$query); + + // If we already have an order or group cluase separate ist for later use + if( strpos($queryRecord,'GROUP') > 0) + { + $groupClause = substr($queryRecord, strpos($queryRecord,'GROUP')+strlen('GROUP BY'), strlen($queryRecord)); + if( strpos($groupClause,'ORDER') > 0) + { + $orderClause = substr($groupClause, strpos($groupClause,'ORDER'), strlen($groupClause)); + $groupClause = substr($groupClause, 0, strpos($groupClause,'ORDER')); + } + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'GROUP')); + } + + if( strpos($queryRecord,'ORDER') > 0) + { + $orderClause = substr($queryRecord, strpos($queryRecord,'ORDER'), strlen($queryRecord)); + $queryRecord = substr($queryRecord, 0, strpos($queryRecord,'ORDER')); + } + + // Construkt the privateGroupList from the filed list by separating combined + // record.field entries + $privateGroupList = array(); + $token = strtok( $queryFields, ", () "); + while( $token !== false) { + if( strpos( $token, ".") !== false) { + array_push( $privateGroupList, $token); + } + $token = strtok( ", () "); + } + sort( $privateGroupList); + $groupFields = ""; + $last = ""; + for( $i = 0; $i < count($privateGroupList); $i++) { + if( $last != $privateGroupList[$i]) { + if( $groupFields == "") + $groupFields = $privateGroupList[$i]; + else + $groupFields .= ",".$privateGroupList[$i]; + } + $last = $privateGroupList[$i]; + } + + // Rebuild the query + $query = "SELECT ".$queryFields.$queryRecord." GROUP BY "; + if( $groupClause != "" ) + $groupClause = $groupClause.",".$groupFields; + else + $groupClause = $groupFields; + $query .= expandStar($groupClause,$log)." ".$orderClause; + + if( $debug) + $log->info( "fixPostgresQuery result: ".$query); + + return( $query); +} + +// Postgres8 will not accept a "tablename.*" entry in the GROUP BY clause +function expandStar($fieldlist,$log) +{ + $expanded=""; + $field = strtok( $fieldlist, ","); + while( $field != "") + { + //remove leading and trailing spaces + $field = trim( $field); + + //still spaces in the field indicate a complex structure + if( strpos( $field, " ") == 0) + { + + //locate table- and fieldname + $pos = strpos( $field, "."); + if( $pos > 0) + { + $table = substr( $field, 0, $pos); + $subfield = substr( $field, $pos+1, strlen($field)-$pos); + + //do we need to expand? + if( $subfield == "*") + $field = expandRecord($table,$log); + } + + //add the propably expanded field to the querylist + if( $expanded == "") + $expanded = $field; + else + $expanded .= ",".$field; + } + + //next field + $field = strtok(","); + } + + //return the expanded fieldlist + return( $expanded); +} + +//return an expanded table field list +function expandRecord($table,$log) +{ global $adb; $result = ""; $subfields = $adb->getColumnNames($table); - - //construct an entity string - for( $i=0; $i 0) - $result = substr( $result, 0, strlen( $result) -1); - - //return out new string - return( $result); -} -?> + + //construct an entity string + for( $i=0; $i 0) + $result = substr( $result, 0, strlen( $result) -1); + + //return out new string + return( $result); +} +?> -------------- next part -------------- diff -ruN orig/data/SugarBean.php htdocs/data/SugarBean.php --- orig/data/SugarBean.php 2007-05-04 16:11:47.000000000 +0200 +++ htdocs/data/SugarBean.php 2007-05-07 14:40:44.000000000 +0200 @@ -1,451 +1,451 @@ -id) || $this->id == "") - { - $isUpdate = false; - } - - if ( $this->new_with_id == true ) - { - $isUpdate = false; - } - - //$this->date_modified = $this->db->formatDate(date('YmdHis')); - $this->date_modified = date('YmdHis'); - if (isset($current_user)) $this->modified_user_id = $current_user->id; - - if($isUpdate) - { - $query = "Update ".$this->table_name." set "; - } - else - { - //$this->date_entered = $this->db->formatDate(date('YmdHis')); - $this->date_entered = date('YmdHis'); - - if($this->new_schema && - $this->new_with_id == false) - { - $this->id = $this->db->getUniqueID("vtiger_users"); - } - - $query = "INSERT into ".$this->table_name; - } - // todo - add date modified to the list. - - // write out the SQL statement. - //$query .= $this->table_name." set "; - - $firstPass = 0; - $insKeys = '('; - $insValues = '('; - $updKeyValues=''; - foreach($this->column_fields as $field) - { - // Do not write out the id vtiger_field on the update statement. - // We are not allowed to change ids. - if($isUpdate && ('id' == $field)) - continue; - - // Only assign variables that have been set. - if(isset($this->$field)) - { - // Try comparing this element with the head element. - if(0 == $firstPass) - { - $firstPass = 1; - } - else - { - if($isUpdate) - { - $updKeyValues = $updKeyValues.", "; - } - else - { - $insKeys = $insKeys.", "; - $insValues = $insValues.", "; - } - } - /*else - $query = $query.", "; - - $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; - */ - if($isUpdate) - { - $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - else - { - $insKeys = $insKeys.$field; - $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); - } - } - } - - if($isUpdate) - { - $query = $query.$updKeyValues." WHERE ID = '$this->id'"; - $this->log->info("Update $this->object_name: ".$query); - } - else - { - $query = $query.$insKeys.") VALUES ".$insValues.")"; - $this->log->info("Insert: ".$query); - } - - $this->db->query($query, true); - - // If this is not an update then store the id for later. - if(!$isUpdate && !$this->new_schema && !$this->new_with_id) - { - $this->db->println("Illegal Access - SugarBean"); - //this is mysql specific - $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); - } - - return $this->id; - } - - - /** - * This function retrieves a record of the appropriate type from the DB. - * It fills in all of the vtiger_fields from the DB into the object it was called on. - * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. - * returns this - The object that it was called apon or null if exactly 1 record was not found. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. - * All Rights Reserved. - * Contributor(s): ______________________________________.. - function retrieve($id = -1, $encodeThis=true) { - if ($id == -1) { - $id = $this->id; - } - if($id == '') { - return null; - } -// GS porting vtiger_crmentity -$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; -// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; - $this->log->debug("Retrieve $this->object_name: ".$query); - - $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); - - if(empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result, -1, $encodeThis); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - */ - - function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { - $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); - - $query = $this->create_list_query($order_by, $where); - - return $this->process_list_query($query, $row_offset, $limit, $max); - } - - /** - * This function returns a full (ie non-paged) list of the current object type. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function get_full_list($order_by = "", $where = "") { - $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - $result =& $this->db->query($query, false); - - if($this->db->getRowCount($result) > 0){ - - // We have some data. - while ($row = $this->db->fetchByAssoc($result)) { - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else { - $this->$field = ''; - } - } - - - $list[] = clone($this); //added clone tosupport PHP5 - } - } - - if (isset($list)) return $list; - else return null; - - } - - function create_list_query($order_by, $where) - { - $query = "SELECT * FROM $this->table_name "; - - if($where != "") - $query .= "where ($where) AND deleted=0"; - else - $query .= "where deleted=0"; - - if(!empty($order_by)) - $query .= " ORDER BY $order_by"; - - return $query; - } - - - function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) - { - global $list_max_entries_per_page; - $this->log->debug("process_list_query: ".$query); - if(!empty($limit) && $limit != -1){ - $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); - }else{ - $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); - } - - $list = Array(); - if($max_per_page == -1){ - $max_per_page = $list_max_entries_per_page; - } - $rows_found = $this->db->getRowCount($result); - - $this->log->debug("Found $rows_found ".$this->object_name."s"); - - $previous_offset = $row_offset - $max_per_page; - $next_offset = $row_offset + $max_per_page; - - if($rows_found != 0) - { - - // We have some data. - - for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ - foreach($this->list_fields as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - - - $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); - } - else - { - $this->$field = ""; - } - } - - - $list[] = clone($this); //added clone to support PHP5 - } - } - - $response = Array(); - $response['list'] = $list; - $response['row_count'] = $rows_found; - $response['next_offset'] = $next_offset; - $response['previous_offset'] = $previous_offset; - - return $response; - } - - - /** - * Track the viewing of a detail record. This leverages get_summary_text() which is object specific - * params $user_id - The user that is viewing the record. - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function track_view($user_id, $current_module,$id='') - { - $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); - - $tracker = new Tracker(); - $tracker->track_view($user_id, $current_module, $id, ''); - } - - - /** This function should be overridden in each module. It marks an item as deleted. - * If it is not overridden, then marking this type of item is not allowed - * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. - * All Rights Reserved.. - * Contributor(s): ______________________________________.. - */ - function mark_deleted($id) - { - $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; - $this->db->query($query, true,"Error marking record deleted: "); - - $this->mark_relationships_deleted($id); - - // Take the item off of the recently viewed lists. - $tracker = new Tracker(); - $tracker->delete_item_history($id); - - } - - - /* This is to allow subclasses to fill in row specific columns of a list view form - function list_view_parse_additional_sections(&$list_form) - { - } - */ - /* This function assigns all of the values into the template for the list view - function get_list_view_array(){ - $return_array = Array(); - - foreach($this->list_fields as $field) - { - $return_array[strtoupper($field)] = $this->$field; - } - - return $return_array; - } - function get_list_view_data() - { - - return $this->get_list_view_array(); - } - - function get_where(&$fields_array) - { - $where_clause = "WHERE "; - $first = 1; - foreach ($fields_array as $name=>$value) - { - if ($first) - { - $first = 0; - } - else - { - $where_clause .= " AND "; - } - - $where_clause .= "$name = ".$adb->quote($value).""; - } - - $where_clause .= " AND deleted=0"; - return $where_clause; - } - - - function retrieve_by_string_fields($fields_array, $encode=true) - { - $where_clause = $this->get_where($fields_array); - - $query = "SELECT * FROM $this->table_name $where_clause"; - $this->log->debug("Retrieve $this->object_name: ".$query); - $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); - if( empty($result)) - { - return null; - } - - $row = $this->db->fetchByAssoc($result,-1, $encode); - - foreach($this->column_fields as $field) - { - if(isset($row[$field])) - { - $this->$field = $row[$field]; - } - } - return $this; - } - - // this method is called during an import before inserting a bean - // define an associative array called $special_fields - // the keys are user defined, and don't directly map to the bean's vtiger_fields - // the value is the method name within that bean that will do extra - // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' - - function process_special_fields() - { - foreach ($this->special_functions as $func_name) - { - if ( method_exists($this,$func_name) ) - { - $this->$func_name(); - } - } - } - - */ -} - - -?> +id) || $this->id == "") + { + $isUpdate = false; + } + + if ( $this->new_with_id == true ) + { + $isUpdate = false; + } + + //$this->date_modified = $this->db->formatDate(date('YmdHis')); + $this->date_modified = date('YmdHis'); + if (isset($current_user)) $this->modified_user_id = $current_user->id; + + if($isUpdate) + { + $query = "Update ".$this->table_name." set "; + } + else + { + //$this->date_entered = $this->db->formatDate(date('YmdHis')); + $this->date_entered = date('YmdHis'); + + if($this->new_schema && + $this->new_with_id == false) + { + $this->id = $this->db->getUniqueID("vtiger_users"); + } + + $query = "INSERT into ".$this->table_name; + } + // todo - add date modified to the list. + + // write out the SQL statement. + //$query .= $this->table_name." set "; + + $firstPass = 0; + $insKeys = '('; + $insValues = '('; + $updKeyValues=''; + foreach($this->column_fields as $field) + { + // Do not write out the id vtiger_field on the update statement. + // We are not allowed to change ids. + if($isUpdate && ('id' == $field)) + continue; + + // Only assign variables that have been set. + if(isset($this->$field)) + { + // Try comparing this element with the head element. + if(0 == $firstPass) + { + $firstPass = 1; + } + else + { + if($isUpdate) + { + $updKeyValues = $updKeyValues.", "; + } + else + { + $insKeys = $insKeys.", "; + $insValues = $insValues.", "; + } + } + /*else + $query = $query.", "; + + $query = $query.$field."='".$adb->quote(from_html($this->$field,$isUpdate))."'"; + */ + if($isUpdate) + { + $updKeyValues = $updKeyValues.$field."=".$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + else + { + $insKeys = $insKeys.$field; + $insValues = $insValues.$this->db->formatString($this->table_name,$field,from_html($this->$field,$isUpdate)); + } + } + } + + if($isUpdate) + { + $query = $query.$updKeyValues." WHERE ID = '$this->id'"; + $this->log->info("Update $this->object_name: ".$query); + } + else + { + $query = $query.$insKeys.") VALUES ".$insValues.")"; + $this->log->info("Insert: ".$query); + } + + $this->db->query($query, true); + + // If this is not an update then store the id for later. + if(!$isUpdate && !$this->new_schema && !$this->new_with_id) + { + $this->db->println("Illegal Access - SugarBean"); + //this is mysql specific + $this->id = $this->db->getOne("SELECT LAST_INSERT_ID()" ); + } + + return $this->id; + } + + + /** + * This function retrieves a record of the appropriate type from the DB. + * It fills in all of the vtiger_fields from the DB into the object it was called on. + * param $id - If ID is specified, it overrides the current value of $this->id. If not specified the current value of $this->id will be used. + * returns this - The object that it was called apon or null if exactly 1 record was not found. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + function retrieve($id = -1, $encodeThis=true) { + if ($id == -1) { + $id = $this->id; + } + if($id == '') { + return null; + } +// GS porting vtiger_crmentity +$query = "SELECT * FROM $this->table_name WHERE $this->module_id = '$id'"; +// $query = "SELECT * FROM $this->table_name WHERE ID = '$id'"; + $this->log->debug("Retrieve $this->object_name: ".$query); + + $result =& $this->db->requireSingleResult($query, true, "Retrieving record by id $this->table_name:$id found "); + + if(empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result, -1, $encodeThis); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + */ + + function get_list($order_by = "", $where = "", $row_offset = 0, $limit=-1, $max=-1) { + $this->log->debug("get_list: order_by = '$order_by' and where = '$where' and limit = '$limit'"); + + $query = $this->create_list_query($order_by, $where); + + return $this->process_list_query($query, $row_offset, $limit, $max); + } + + /** + * This function returns a full (ie non-paged) list of the current object type. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_full_list($order_by = "", $where = "") { + $this->log->debug("get_full_list: order_by = '$order_by' and where = '$where'"); + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + $result =& $this->db->query($query, false); + + if($this->db->getRowCount($result) > 0){ + + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + $this->log->debug("process_full_list: $this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else { + $this->$field = ''; + } + } + + + $list[] = clone($this); //added clone tosupport PHP5 + } + } + + if (isset($list)) return $list; + else return null; + + } + + function create_list_query($order_by, $where) + { + $query = "SELECT * FROM $this->table_name "; + + if($where != "") + $query .= "where ($where) AND deleted=0"; + else + $query .= "where deleted=0"; + + if(!empty($order_by)) + $query .= " ORDER BY $order_by"; + + return $query; + } + + + function process_list_query($query, $row_offset, $limit= -1, $max_per_page = -1) + { + global $list_max_entries_per_page; + $this->log->debug("process_list_query: ".$query); + if(!empty($limit) && $limit != -1){ + $result =& $this->db->limitQuery($query, $row_offset + 0, $limit,true,"Error retrieving $this->object_name list: "); + }else{ + $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); + } + + $list = Array(); + if($max_per_page == -1){ + $max_per_page = $list_max_entries_per_page; + } + $rows_found = $this->db->getRowCount($result); + + $this->log->debug("Found $rows_found ".$this->object_name."s"); + + $previous_offset = $row_offset - $max_per_page; + $next_offset = $row_offset + $max_per_page; + + if($rows_found != 0) + { + + // We have some data. + + for($index = $row_offset , $row = $this->db->fetchByAssoc($result, $index); $row && ($index < $row_offset + $max_per_page || $max_per_page == -99) ;$index++, $row = $this->db->fetchByAssoc($result, $index)){ + foreach($this->list_fields as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + + + $this->log->debug("$this->object_name({$row['id']}): ".$field." = ".$this->$field); + } + else + { + $this->$field = ""; + } + } + + + $list[] = clone($this); //added clone to support PHP5 + } + } + + $response = Array(); + $response['list'] = $list; + $response['row_count'] = $rows_found; + $response['next_offset'] = $next_offset; + $response['previous_offset'] = $previous_offset; + + return $response; + } + + + /** + * Track the viewing of a detail record. This leverages get_summary_text() which is object specific + * params $user_id - The user that is viewing the record. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function track_view($user_id, $current_module,$id='') + { + $this->log->debug("About to call vtiger_tracker (user_id, module_name, item_id)($user_id, $current_module, $this->id)"); + + $tracker = new Tracker(); + $tracker->track_view($user_id, $current_module, $id, ''); + } + + + /** This function should be overridden in each module. It marks an item as deleted. + * If it is not overridden, then marking this type of item is not allowed + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function mark_deleted($id) + { + $query = "UPDATE $this->table_name set deleted=1 where id='$id'"; + $this->db->query($query, true,"Error marking record deleted: "); + + $this->mark_relationships_deleted($id); + + // Take the item off of the recently viewed lists. + $tracker = new Tracker(); + $tracker->delete_item_history($id); + + } + + + /* This is to allow subclasses to fill in row specific columns of a list view form + function list_view_parse_additional_sections(&$list_form) + { + } + */ + /* This function assigns all of the values into the template for the list view + function get_list_view_array(){ + $return_array = Array(); + + foreach($this->list_fields as $field) + { + $return_array[strtoupper($field)] = $this->$field; + } + + return $return_array; + } + function get_list_view_data() + { + + return $this->get_list_view_array(); + } + + function get_where(&$fields_array) + { + $where_clause = "WHERE "; + $first = 1; + foreach ($fields_array as $name=>$value) + { + if ($first) + { + $first = 0; + } + else + { + $where_clause .= " AND "; + } + + $where_clause .= "$name = ".$adb->quote($value).""; + } + + $where_clause .= " AND deleted=0"; + return $where_clause; + } + + + function retrieve_by_string_fields($fields_array, $encode=true) + { + $where_clause = $this->get_where($fields_array); + + $query = "SELECT * FROM $this->table_name $where_clause"; + $this->log->debug("Retrieve $this->object_name: ".$query); + $result =& $this->db->requireSingleResult($query, true, "Retrieving record $where_clause:"); + if( empty($result)) + { + return null; + } + + $row = $this->db->fetchByAssoc($result,-1, $encode); + + foreach($this->column_fields as $field) + { + if(isset($row[$field])) + { + $this->$field = $row[$field]; + } + } + return $this; + } + + // this method is called during an import before inserting a bean + // define an associative array called $special_fields + // the keys are user defined, and don't directly map to the bean's vtiger_fields + // the value is the method name within that bean that will do extra + // processing for that vtiger_field. example: 'full_name'=>'get_names_from_full_name' + + function process_special_fields() + { + foreach ($this->special_functions as $func_name) + { + if ( method_exists($this,$func_name) ) + { + $this->$func_name(); + } + } + } + + */ +} + + +?> -------------- next part -------------- diff -ruN orig/include/utils/EditViewUtils.php htdocs/include/utils/EditViewUtils.php --- orig/include/utils/EditViewUtils.php 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/utils/EditViewUtils.php 2007-05-07 14:45:15.000000000 +0200 @@ -157,7 +157,7 @@ } $fieldvalue [] = $options; } - elseif($uitype == 17) + elseif($uitype == 17 || $uitype == 18) { $editview_label[]=$mod_strings[$fieldlabel]; $fieldvalue [] = $value; @@ -1194,6 +1194,11 @@ $fieldvalue[] = $value; } + // For inheritance + if ( in_array($uitype,array(3,4,18,31,32)) ) { + $fieldvalue[] = $col_fields[$fieldname."@##@"]; + } + // Mike Crowe Mod --------------------------------------------------------force numerics right justified. if ( !eregi("id=",$custfld) ) $custfld = preg_replace("/debug("Exiting getOutputHtml method ..."); return $final_arr; } @@ -1883,4 +1889,104 @@ } +/** This function returns the detailed list of organization units associated to +* the selected organization +* Param $organization - organization object +*/ + +function getOrgUnits($organization,$orgunitid="") +{ + // The array we're about to build + $orgunittab = array(); + $fields = "orgunitid,type,name,address,city,state,country,code,phone,fax,website"; + $fields .= ",logoname,quote_template,so_template,po_template,invoice_template"; + global $adb; + + // Parameter check + if( !isset( $organization) || $organization == '' || + !isset( $organization->id) || $organization->id == '') + return $orgunittab; + + // Database query + if( $orgunitid != "0") + $query = "SELECT vtiger_orgunit.orgunitid AS orgunitid,"; + else + $query = "SELECT 0 AS orgunitid,"; + + // logoname is only defined in the organization record. + $query .= "'@##@' AS logoname, vtiger_organizationdetails.logoname AS org_logoname"; + + foreach( split( ',', $fields) as $field) { + if( $field != "orgunitid" && $field != "logoname") { + if( $orgunitid != "0") + $query .= ",vtiger_orgunit.".$field." AS ".$field; + else + $query .= ",NULL AS ".$field; + if( $field != "type" && $field != "name") + $query .= ",vtiger_organizationdetails.".$field." AS org_".$field; + } + } + + if( $orgunitid != "0" ) { + // database joins + $query .= " FROM vtiger_orgunit + LEFT JOIN vtiger_organizationdetails + ON vtiger_orgunit.organizationname=vtiger_organizationdetails.organizationname "; + + // single or list query? + if( $orgunitid == "") + $query .= "WHERE vtiger_orgunit.organizationname='".$organization->id."' "; + else + $query .= "WHERE vtiger_orgunit.orgunitid=".$orgunitid." "; + + // do not return deleted orgunits + $query .= "AND vtiger_orgunit.deleted=0"; + } + + else { + $query .= " FROM vtiger_organizationdetails "; + $query .= " WHERE vtiger_organizationdetails.organizationname='".$organization->id."' "; + } + + // Do not return deleted organizations + $query .= " AND vtiger_organizationdetails.deleted=0"; + + $result = $adb->query( $query); + $noofrows = $adb->num_rows($result); + + // Get all rows from database + for($j = 0; $j < $noofrows; $j++) { + $orgunit = array(); + foreach( split( ',', $fields) as $field) { + if( $orgunitid != "0") { + $orgunit[$field] = $adb->query_result($result,$j,$field); + + // Inherited and extended fields + if( substr( $orgunit[$field], 0, 4) == "@##@") { + if( $field == "name") { + $orgunit[$field] = substr($orgunit[$field], 4, strlen( $orgunit[$field])-4); + if( $orgunitid != "") + $orgunit[$field] = $organization->id." ".$orgunit[$field]; + } else { + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + } + + // no orgunit selected + else { + if( $field == "name") + $orgunit[$field] = $organization->id; + elseif( $field == "orgunitid") + $orgunit[$field] = 0; + else + $orgunit[$field] = $adb->query_result($result,$j,"org_".$field); + } + } + $id = $orgunit["orgunitid"]; + $orgunittab[$id] = $orgunit; + } + // Return what we've found + return $orgunittab; +} ?> -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 14:52:56.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-04 15:04:43.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Accounts/Delete.php htdocs/modules/Accounts/Delete.php --- orig/modules/Accounts/Delete.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/Delete.php 2007-05-07 17:04:15.000000000 +0200 @@ -1,37 +1,37 @@ - + -------------- next part -------------- diff -ruN orig/modules/Accounts/DetailViewAjax.php htdocs/modules/Accounts/DetailViewAjax.php --- orig/modules/Accounts/DetailViewAjax.php 2007-05-04 16:12:05.000000000 +0200 +++ htdocs/modules/Accounts/DetailViewAjax.php 2007-05-07 17:09:50.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Accounts"); - $acntObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving - { - $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $acntObj->id = $crmid; - $acntObj->mode = "edit"; - $acntObj->save("Accounts"); - if($acntObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Accounts"); + $acntObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'annual_revenue')//annual revenue converted to dollar value while saving + { + $acntObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $acntObj->id = $crmid; + $acntObj->mode = "edit"; + $acntObj->save("Accounts"); + if($acntObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN orig/Smarty/templates/RelatedLists.tpl htdocs/Smarty/templates/RelatedLists.tpl --- orig/Smarty/templates/RelatedLists.tpl 2007-05-04 16:12:15.000000000 +0200 +++ htdocs/Smarty/templates/RelatedLists.tpl 2007-05-08 22:57:59.000000000 +0200 @@ -122,8 +122,21 @@ {$SINGLE_MOD} {$APP.LBL_INFORMATION} {/if}   - {$APP.LBL_MORE} {$APP.LBL_INFORMATION} -   + {if $MODULE eq 'Products'} + {if $RELATEDLISTS ne ''} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {else} + {$APP.LBL_DEPLIST} {$APP.LBL_INFORMATION} +   + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} + {/if} +   + {else} + {$APP.LBL_MORE} {$APP.LBL_INFORMATION} +   + {/if} @@ -137,12 +150,12 @@ -------------- next part -------------- diff -ruN orig/modules/Accounts/language/en_us.lang.php htdocs/modules/Accounts/language/en_us.lang.php --- orig/modules/Accounts/language/en_us.lang.php 2007-05-07 15:43:12.000000000 +0200 +++ htdocs/modules/Accounts/language/en_us.lang.php 2007-05-09 00:28:57.000000000 +0200 @@ -1,217 +1,217 @@ -'Accounts', -'LBL_MODULE_TITLE'=>'Accounts: Home', -'LBL_SEARCH_FORM_TITLE'=>'Account Search', -'LBL_LIST_FORM_TITLE'=>'Account List', -'LBL_NEW_FORM_TITLE'=>'New Account', -'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', -// Label for Top Accounts in Home Page, added for 4.2 GA -'LBL_TOP_ACCOUNTS'=>'My Top Accounts', -'LBL_TOP_AMOUNT'=>'Amount', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_LIST_CITY'=>'City', -'LBL_LIST_WEBSITE'=>'Website', -'LBL_LIST_STATE'=>'State', -'LBL_LIST_PHONE'=>'Phone', -'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', -'LBL_LIST_CONTACT_NAME'=>'Contact Name', -'LBL_LIST_AMOUNT' => 'Total Opportunities', - -//DON'T CONVERT THESE THEY ARE MAPPINGS -'db_name' => 'LBL_LIST_ACCOUNT_NAME', -'db_website' => 'LBL_LIST_WEBSITE', -'db_billing_address_city' => 'LBL_LIST_CITY', - -//END DON'T CONVERT - -'LBL_ACCOUNT'=>'Account:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_PHONE'=>'Phone:', -'LBL_WEBSITE'=>'Website:', -'LBL_FAX'=>'Fax:', -'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', -'LBL_OTHER_PHONE'=>'Other Phone:', -'LBL_ANY_PHONE'=>'Any Phone:', -'LBL_MEMBER_OF'=>'Member of:', -'LBL_EMAIL'=>'Email:', -'LBL_EMPLOYEES'=>'Employees:', -'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', -'LBL_ANY_EMAIL'=>'Any Email:', -'LBL_OWNERSHIP'=>'Ownership:', -'LBL_RATING'=>'Rating:', -'LBL_INDUSTRY'=>'Industry:', -'LBL_SIC_CODE'=>'SIC Code:', -'LBL_TYPE'=>'Type:', -'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', -'LBL_ADDRESS_INFORMATION'=>'Address Information', -'LBL_ACCOUNT_INFORMATION'=>'Account Information', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', -'LBL_BILLING_ADDRESS'=>'Billing Address:', -'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', -'LBL_ANY_ADDRESS'=>'Any Address:', -'LBL_CITY'=>'City:', -'LBL_STATE'=>'State:', -'LBL_POSTAL_CODE'=>'Postal Code:', -'LBL_COUNTRY'=>'Country:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information', -'LBL_DESCRIPTION'=>'Description:', -'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', -'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', -'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', -'LBL_DUPLICATE'=>'Potential Duplicate Accounts', -'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', - -'LBL_INVITEE'=>'Contacts', -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", - -'LBL_SELECT_ACCOUNT'=>'Select Account', -'LBL_GENERAL_INFORMATION'=>'General Information', - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_PROSPECT'=>'Prospect', -'LBL_INVESTOR'=>'Investor', -'LBL_RESELLER'=>'Reseller', -'LBL_PARTNER'=>'Partner', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Account Tools', -//Added for 4GA -'Account Name'=>'Account Name', -'Phone'=>'Phone', -'Website'=>'Website', -'Fax'=>'Fax', -'Ticker Symbol'=>'Ticker Symbol', -'Other Phone'=>'Other Phone', -'Member Of'=>'Member Of', -'Email'=>'Email', -'Employees'=>'Employees', -'Other Email'=>'Other Email', -'Ownership'=>'Ownership', -'Rating'=>'Rating', -'industry'=>'Industry', -'SIC Code'=>'SIC Code', -'Type'=>'Type', -'Annual Revenue'=>'Annual Revenue', -'Assigned To'=>'Assigned To', -'Billing Address'=>'Billing Address', -'Shipping Address'=>'Shipping Address', -'Billing City'=>'Billing City', -'Shipping City'=>'Shipping City', -'Billing State'=>'Billing State', -'Shipping State'=>'Shipping State', -'Billing Code'=>'Billing Postal Code', -'Shipping Code'=>'Shipping Postal Code', -'Billing Country'=>'Billing Country', -'Shipping Country'=>'Shipping Country', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Description'=>'Description', -'Shipping Po Box'=>'Shipping PO Box', -'Billing Po Box'=>'Billing PO Box', - -//Added after 4.2 patch 2 -'Email Opt Out'=>'Email Opt Out', -'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', - -//Added after 5Alpha5 -'Notify Owner'=>'Notify Owner', - -//Added for existing picklist entries - -'--None--'=>'--None--', - -'Acquired'=>'Acquired', -'Active'=>'Active', -'Market Failed'=>'Market Failed', -'Project Cancelled'=>'Project Cancelled', -'Shutdown'=>'Shutdown', - -'Apparel'=>'Apparel', -'Banking'=>'Banking', -'Biotechnology'=>'Biotechnology', -'Chemicals'=>'Chemicals', -'Communications'=>'Communications', -'Construction'=>'Construction', -'Consulting'=>'Consulting', -'Education'=>'Education', -'Electronics'=>'Electronics', -'Energy'=>'Energy', -'Engineering'=>'Engineering', -'Entertainment'=>'Entertainment', -'Environmental'=>'Environmental', -'Finance'=>'Finance', -'Food & Beverage'=>'Food & Beverage', -'Government'=>'Government', -'Healthcare'=>'Healthcare', -'Hospitality'=>'Hospitality', -'Insurance'=>'Insurance', -'Machinery'=>'Machinery', -'Manufacturing'=>'Manufacturing', -'Media'=>'Media', -'Not For Profit'=>'Not For Profit', -'Recreation'=>'Recreation', -'Retail'=>'Retail', -'Shipping'=>'Shipping', -'Technology'=>'Technology', -'Telecommunications'=>'Telecommunications', -'Transportation'=>'Transportation', -'Utilities'=>'Utilities', -'Other'=>'Other', - -'Analyst'=>'Analyst', -'Competitor'=>'Competitor', -'Customer'=>'Customer', -'Integrator'=>'Integrator', -'Investor'=>'Investor', -'Partner'=>'Partner', -'Press'=>'Press', -'Prospect'=>'Prospect', -'Reseller'=>'Reseller', -'LBL_START_DATE' => 'Start Date', -'LBL_END_DATE' => 'End Date', +'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account Search', +'LBL_LIST_FORM_TITLE'=>'Account List', +'LBL_NEW_FORM_TITLE'=>'New Account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Accounts', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Opportunities', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Account Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Accounts', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Account to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Account', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account Tools', +//Added for 4GA +'Account Name'=>'Account Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', // Added for multi organization support TRAC #2035 'LBL_COMPANY_ASSIGNMENT'=>'Organization Assignment', 'Organization Assignment'=>'Assigned to', -); - -?> +); + +?> -------------- next part -------------- diff -ruN orig/modules/Emails/EmailsAjax.php htdocs/modules/Emails/EmailsAjax.php --- orig/modules/Emails/EmailsAjax.php 2007-05-04 16:12:10.000000000 +0200 +++ htdocs/modules/Emails/EmailsAjax.php 2007-05-09 00:55:09.000000000 +0200 @@ -1,54 +1,54 @@ -retrieve_entity_info($crmid,"Emails"); - $modObj->column_fields[$fieldname] = $fieldvalue; - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Emails"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -elseif($_REQUEST['ajaxmode'] == 'qcreate') -{ - require_once('quickcreate.php'); -} -else -{ - require_once('include/Ajax/CommonAjax.php'); -} -?> +retrieve_entity_info($crmid,"Emails"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Emails"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +elseif($_REQUEST['ajaxmode'] == 'qcreate') +{ + require_once('quickcreate.php'); +} +else +{ + require_once('include/Ajax/CommonAjax.php'); +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Notes/Delete.php htdocs/modules/Notes/Delete.php --- htdocs.orig/modules/Notes/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Notes/Delete.php 2007-05-09 00:57:22.000000000 +0200 @@ -1,35 +1,35 @@ - + -------------- next part -------------- diff -ruN htdocs.orig/modules/Portal/Popup.php htdocs/modules/Portal/Popup.php --- htdocs.orig/modules/Portal/Popup.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Popup.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,68 +1,68 @@ -query($query); - $portalname = $adb->query_result($result,0,'portalname'); - $portalurl = $adb->query_result($result,0,'portalurl'); -} -$portal_inputs=''; -$portal_inputs.='
-
- - {include file='RelatedListsHidden.tpl'} -
- {include file='RelatedListContents.tpl'} -
- + + {include file='RelatedListsHidden.tpl'} +
+ {include file='RelatedListContents.tpl'} +
+ {*-- End of Blocks--*}
- - - - -
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
- - - - -
- - - - - - - - - - - -
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
-
- - - - -
-    - -
-'; - -echo $portal_inputs; - - -?> +query($query); + $portalname = $adb->query_result($result,0,'portalname'); + $portalurl = $adb->query_result($result,0,'portalurl'); +} +$portal_inputs=''; +$portal_inputs.='
+ + + + + +
' .$mod_strings['LBL_ADD'] .' '.$mod_strings['LBL_BOOKMARK'].'
+ + + + +
+ + + + + + + + + + + +
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_URL'] .' http://
'.$mod_strings['LBL_BOOKMARK'].' ' .$mod_strings['LBL_NAME'] .'
+
+ + + + +
+    + +
+
'; + +echo $portal_inputs; + + +?> diff -ruN htdocs.orig/modules/Portal/Portal.php htdocs/modules/Portal/Portal.php --- htdocs.orig/modules/Portal/Portal.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Portal/Portal.php 2007-05-09 00:58:36.000000000 +0200 @@ -1,45 +1,45 @@ -println("just entered the SavePortal method"); - $portalid=$adb->getUniqueID('vtiger_portal'); - $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -/** Function to update the portal in database - * @param $portalname : Type String - * @param $portalurl : Type String - * @param $portalid : Type Integer - * This function updates the portal with the given $portalname,$portalurl - * This Returns $portalid - */ -function UpdatePortal($portalname,$portalurl,$portalid) -{ - global $adb; - $adb->println("just entered the SavePortal method"); - $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; - $adb->println($query); - $result=$adb->query($query); - return $portalid; -} -?> +println("just entered the SavePortal method"); + $portalid=$adb->getUniqueID('vtiger_portal'); + $query="insert into vtiger_portal values(".$portalid.",'".$portalname."','".$portalurl."',0)"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +/** Function to update the portal in database + * @param $portalname : Type String + * @param $portalurl : Type String + * @param $portalid : Type Integer + * This function updates the portal with the given $portalname,$portalurl + * This Returns $portalid + */ +function UpdatePortal($portalname,$portalurl,$portalid) +{ + global $adb; + $adb->println("just entered the SavePortal method"); + $query="update vtiger_portal set portalname='$portalname' ,portalurl='$portalurl' where portalid=$portalid"; + $adb->println($query); + $result=$adb->query($query); + return $portalid; +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Settings/TaxConfig.php htdocs/modules/Settings/TaxConfig.php --- htdocs.orig/modules/Settings/TaxConfig.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Settings/TaxConfig.php 2007-05-09 01:00:29.000000000 +0200 @@ -1,244 +1,244 @@ -assign("EDIT_MODE", 'true'); -} -elseif($_REQUEST['sh_edit_tax'] == 'true') -{ - $smarty->assign("SH_EDIT_MODE", 'true'); -} - -//To add tax -if($_REQUEST['add_tax_type'] == 'true') -{ - //Add the given tax name and value as a new tax type - echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); - $getlist = true; -} -elseif($_REQUEST['sh_add_tax_type'] == 'true') -{ - echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); - $getlist = true; -} - -//To Disable ie., delete or enable -if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') -{ - if($_REQUEST['disable'] == 'true') - changeDeleted($_REQUEST['taxname'],1); - else - changeDeleted($_REQUEST['taxname'],0); - $getlist = true; -} -elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') -{ - if($_REQUEST['sh_disable'] == 'true') - changeDeleted($_REQUEST['sh_taxname'],1,'sh'); - else - changeDeleted($_REQUEST['sh_taxname'],0,'sh'); - $getlist = true; -} - -//after done save or enable/disable or added new tax the list will be retrieved again from db -if($getlist) -{ - $tax_details = getAllTaxes(); - $sh_tax_details = getAllTaxes('all','sh'); -} - -$smarty->assign("TAX_COUNT", count($tax_details)); -$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); - -if(count($tax_details) == 0) - $smarty->assign("TAX_COUNT", 0); -if(count($sh_tax_details) == 0) - $smarty->assign("SH_TAX_COUNT", 0); - -$smarty->assign("TAX_VALUES", $tax_details); - -$smarty->assign("SH_TAX_VALUES", $sh_tax_details); - -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("APP", $app_strings); -$smarty->assign("MOD", $mod_strings); -$smarty->display("Settings/TaxConfig.tpl"); - - -/** Function to update the list of Tax percentages for the passed tax types - * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxPercentages($new_percentages, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_percentages as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} - -/** Function to update the list of Tax Labels for the taxes - * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb - * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table - * @return void - */ -function updateTaxLabels($new_labels, $sh='') -{ - global $adb, $log; - $log->debug("Entering into the function updateTaxPercentages"); - - foreach($new_labels as $taxid => $new_val) - { - if($new_val != '') - { - if($sh != '' && $sh == 'sh') - $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; - else - $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; - $adb->query($query); - } - } - - $log->debug("Exiting from the function updateTaxPercentages"); -} -/** Function used to add the tax type which will do database alterations - * @param string $taxlabel - tax label name to be added - * @param string $taxvalue - tax value to be added - * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table - * @return void - */ -function addTaxType($taxlabel, $taxvalue, $sh='') -{ - global $adb, $log; - $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); - - //First we will check whether the tax is already available or not - if($sh != '' && $sh == 'sh') - $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; - else - $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; - $check_res = $adb->query($check_query); - - if($adb->num_rows($check_res) > 0) - return "This tax is already available"; - - //if the tax is not available then add this tax. - //Add this tax as a column in related table - if($sh != '' && $sh == 'sh') - { - $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); - $taxname = "shtax".$taxid; - $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; - } - else - { - $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); - $taxname = "tax".$taxid; - $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; - } - $res = $adb->query($query); - - //if the tax is added as a column then we should add this tax in the list of taxes - if($res) - { - if($sh != '' && $sh == 'sh') - $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - else - $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; - - $res1 = $adb->query($query1); - } - - $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); - if($res1) - return ''; - else - return "There may be some problem in adding the Tax type. Please try again"; -} - -/** Function used to Enable or Disable the tax type - * @param string $taxname - taxname to enable or disble - * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable - * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo - * @return void - */ -function changeDeleted($taxname, $deleted, $sh='') -{ - global $log, $adb; - $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); - - if($sh == 'sh') - $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); - else - $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); - $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); -} - -?> +assign("EDIT_MODE", 'true'); +} +elseif($_REQUEST['sh_edit_tax'] == 'true') +{ + $smarty->assign("SH_EDIT_MODE", 'true'); +} + +//To add tax +if($_REQUEST['add_tax_type'] == 'true') +{ + //Add the given tax name and value as a new tax type + echo addTaxType($_REQUEST['addTaxLabel'],$_REQUEST['addTaxValue']); + $getlist = true; +} +elseif($_REQUEST['sh_add_tax_type'] == 'true') +{ + echo addTaxType($_REQUEST['sh_addTaxLabel'],$_REQUEST['sh_addTaxValue'],'sh'); + $getlist = true; +} + +//To Disable ie., delete or enable +if(($_REQUEST['disable'] == 'true' || $_REQUEST['enable'] == 'true') && $_REQUEST['taxname'] != '') +{ + if($_REQUEST['disable'] == 'true') + changeDeleted($_REQUEST['taxname'],1); + else + changeDeleted($_REQUEST['taxname'],0); + $getlist = true; +} +elseif(($_REQUEST['sh_disable'] == 'true' || $_REQUEST['sh_enable'] == 'true') && $_REQUEST['sh_taxname'] != '') +{ + if($_REQUEST['sh_disable'] == 'true') + changeDeleted($_REQUEST['sh_taxname'],1,'sh'); + else + changeDeleted($_REQUEST['sh_taxname'],0,'sh'); + $getlist = true; +} + +//after done save or enable/disable or added new tax the list will be retrieved again from db +if($getlist) +{ + $tax_details = getAllTaxes(); + $sh_tax_details = getAllTaxes('all','sh'); +} + +$smarty->assign("TAX_COUNT", count($tax_details)); +$smarty->assign("SH_TAX_COUNT", count($sh_tax_details)); + +if(count($tax_details) == 0) + $smarty->assign("TAX_COUNT", 0); +if(count($sh_tax_details) == 0) + $smarty->assign("SH_TAX_COUNT", 0); + +$smarty->assign("TAX_VALUES", $tax_details); + +$smarty->assign("SH_TAX_VALUES", $sh_tax_details); + +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("APP", $app_strings); +$smarty->assign("MOD", $mod_strings); +$smarty->display("Settings/TaxConfig.tpl"); + + +/** Function to update the list of Tax percentages for the passed tax types + * @param array $new_percentages - array of tax types and the values like [taxid]=new value ie., [1]=3.56, [2]=11.45 + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxPercentages($new_percentages, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_percentages as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set percentage=\"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set percentage = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} + +/** Function to update the list of Tax Labels for the taxes + * @param array $new_labels - array of tax types and the values like [taxid]=new label ie., [1]=aa, [2]=bb + * @param string $sh - sh or empty, if sh passed then update will be done in shipping and handling related table + * @return void + */ +function updateTaxLabels($new_labels, $sh='') +{ + global $adb, $log; + $log->debug("Entering into the function updateTaxPercentages"); + + foreach($new_labels as $taxid => $new_val) + { + if($new_val != '') + { + if($sh != '' && $sh == 'sh') + $query = "update vtiger_shippingtaxinfo set taxlabel= \"$new_val\" where taxid=\"$taxid\""; + else + $query = "update vtiger_inventorytaxinfo set taxlabel = \"$new_val\" where taxid=\"$taxid\""; + $adb->query($query); + } + } + + $log->debug("Exiting from the function updateTaxPercentages"); +} +/** Function used to add the tax type which will do database alterations + * @param string $taxlabel - tax label name to be added + * @param string $taxvalue - tax value to be added + * @param string $sh - sh or empty , if sh passed then the tax will be added in shipping and handling related table + * @return void + */ +function addTaxType($taxlabel, $taxvalue, $sh='') +{ + global $adb, $log; + $log->debug("Entering into function addTaxType($taxlabel, $taxvalue, $sh)"); + + //First we will check whether the tax is already available or not + if($sh != '' && $sh == 'sh') + $check_query = "select taxlabel from vtiger_shippingtaxinfo where taxlabel='".addslashes($taxlabel)."'"; + else + $check_query = "select taxlabel from vtiger_inventorytaxinfo where taxlabel='".addslashes($taxlabel)."'"; + $check_res = $adb->query($check_query); + + if($adb->num_rows($check_res) > 0) + return "This tax is already available"; + + //if the tax is not available then add this tax. + //Add this tax as a column in related table + if($sh != '' && $sh == 'sh') + { + $taxid = $adb->getUniqueID("vtiger_shippingtaxinfo"); + $taxname = "shtax".$taxid; + $query = "alter table vtiger_inventoryshippingrel add column $taxname decimal(7,3) default NULL"; + } + else + { + $taxid = $adb->getUniqueID("vtiger_inventorytaxinfo"); + $taxname = "tax".$taxid; + $query = "alter table vtiger_inventoryproductrel add column $taxname decimal(7,3) default NULL"; + } + $res = $adb->query($query); + + //if the tax is added as a column then we should add this tax in the list of taxes + if($res) + { + if($sh != '' && $sh == 'sh') + $query1 = "insert into vtiger_shippingtaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + else + $query1 = "insert into vtiger_inventorytaxinfo values($taxid,'".$taxname."','".$taxlabel."','".$taxvalue."',0)"; + + $res1 = $adb->query($query1); + } + + $log->debug("Exit from function addTaxType($taxlabel, $taxvalue)"); + if($res1) + return ''; + else + return "There may be some problem in adding the Tax type. Please try again"; +} + +/** Function used to Enable or Disable the tax type + * @param string $taxname - taxname to enable or disble + * @param int $deleted - 0 or 1 where 0 to enable and 1 to disable + * @param string $sh - sh or empty, if sh passed then the enable/disable will be done in shipping and handling tax table ie.,vtiger_shippingtaxinfo else this enable/disable will be done in Product tax table ie., in vtiger_inventorytaxinfo + * @return void + */ +function changeDeleted($taxname, $deleted, $sh='') +{ + global $log, $adb; + $log->debug("Entering into function changeDeleted($taxname, $deleted, $sh)"); + + if($sh == 'sh') + $adb->query("update vtiger_shippingtaxinfo set deleted=$deleted where taxname=\"$taxname\""); + else + $adb->query("update vtiger_inventorytaxinfo set deleted=$deleted where taxname=\"$taxname\""); + $log->debug("Exit from function changeDeleted($taxname, $deleted, $sh)"); +} + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Users/DetailViewAjax.php htdocs/modules/Users/DetailViewAjax.php --- htdocs.orig/modules/Users/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/DetailViewAjax.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,35 +1,35 @@ - "; -$local_log =& LoggerManager::getLogger('UsersAjax'); +$local_log =& LoggerManager::getLogger('UsersAjax'); $my_status = "Failure"; -$ajaxaction = $_REQUEST["ajxaction"]; -if($ajaxaction == "DETAILVIEW") -{ - $crmid = $_REQUEST["recordid"]; - $tablename = $_REQUEST["tableName"]; - $fieldname = $_REQUEST["fldName"]; - $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); +$ajaxaction = $_REQUEST["ajxaction"]; +if($ajaxaction == "DETAILVIEW") +{ + $crmid = $_REQUEST["recordid"]; + $tablename = $_REQUEST["tableName"]; + $fieldname = $_REQUEST["fldName"]; + $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); $local_log->debug("Entering DetailViewAjax crmid=".$crmid." tab=".$tablename." fld=".$fieldname." val='".$fieldvalue."'"); - if($crmid != "") - { - $userObj = new Users(); - $userObj->retrieve_entity_info($crmid,"Users"); + if($crmid != "") + { + $userObj = new Users(); + $userObj->retrieve_entity_info($crmid,"Users"); //assigned organizations if( $fieldname == 'assigned_org[]') { @@ -173,30 +173,30 @@ $adb->completeTransaction(); //Organization assignment - require('modules/Users/GetUserOrg.php'); + require('modules/Users/GetUserOrg.php'); } //anything else is a field update else { - $userObj->column_fields[$fieldname] = $fieldvalue; - $userObj->id = $crmid; - $userObj->mode = "edit"; - $userObj->save("Users"); + $userObj->column_fields[$fieldname] = $fieldvalue; + $userObj->id = $crmid; + $userObj->mode = "edit"; + $userObj->save("Users"); } //result would be success as long as the user exists - if($userObj->id != "") - { - echo ":#:SUCCESS"; + if($userObj->id != "") + { + echo ":#:SUCCESS"; $my_status = "Success"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } $local_log->debug("Exit DetailViewAjax: ".$my_status); -} -?> +} +?> diff -ruN htdocs.orig/modules/Users/EditView.php htdocs/modules/Users/EditView.php --- htdocs.orig/modules/Users/EditView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/EditView.php 2007-05-09 01:01:55.000000000 +0200 @@ -42,7 +42,7 @@ $smarty->assign("ID",$_REQUEST['record']); $mode='edit'; if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) die ("Unauthorized access to user administration."); - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); $smarty->assign("USERNAME",$focus->last_name.' '.$focus->first_name); }else { @@ -59,6 +59,11 @@ $focus->column_fields['confirm_password']=''; } +if(is_admin($current_user)) + $smarty->assign("IS_ADMIN", true); +else + $smarty->assign("IS_ADMIN", false); + global $theme; $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; @@ -111,9 +116,57 @@ $smarty->assign("HOMEORDER",$focus->getHomeOrder($focus->id)); $smarty->assign("DUPLICATE",$_REQUEST['isDuplicate']); - $smarty->assign('PARENTTAB',$_REQUEST['parenttab']); +//Organization assignment +if( $mode == "create" ) { + $orgs = array(); + $smarty_orgs = array($orgs); + + //all organizations + $sql = "SELECT organizationname FROM vtiger_organizationdetails WHERE deleted=0"; + $result = $adb->query($sql); + $allorgs = array(); + while($org_result = $adb->fetch_array($result)) { + $key = $org_result["organizationname"]; + $allorgs[$key] = ''; + } + $smarty_allorgs = array($allorgs); + + //Organization untis + $orgunits = array(); + $smarty_orgunits = array($orgunits); + + //The remaining field are intentially left blank + $curorg = ""; + $assigned_org = ""; + $prim_orgunits = ""; + $org_separator = "
 "; + + //Set up session variables + $_SESSION['all_user_organizations'] = $smarty_allorgs; + $_SESSION['edit_user_organizations'] = $smarty_orgs; + $_SESSION['edit_user_orgunits'] = $smarty_orgunits; + $_SESSION['edit_user_primary_organization'] = $curorg; + $_SESSION['edit_user_assigned_organization'] = $assigned_org; + $_SESSION['edit_user_primary_orgunits'] = $prim_orgunits; +} + +//In case of edit mode use the predefined gathering fuction +else { + $crmid = $focus->id; + require('modules/Users/GetUserOrg.php'); +} + +//Assign the organization details to the html output +$smarty->assign("MULTISELECT_COMBO_BOX_ITEM_SEPARATOR_STRING", $org_separator); +$smarty->assign("ALL_USER_ORGANIZATIONS", $smarty_allorgs); +$smarty->assign("EDIT_USER_ORGANIZATIONS", $smarty_orgs); +$smarty->assign("EDIT_USER_ORGUNITS", $smarty_orgunits); +$smarty->assign("EDIT_USER_PRIMARY_ORGANIZATION", $curorg); +$smarty->assign("EDIT_USER_ASSIGNED_ORGANIZATIONS", $assigned_org); +$smarty->assign("EDIT_USER_PRIMARY_ORGUNITS", $prim_orgunits); + $smarty->display('UserEditView.tpl'); ?> diff -ruN htdocs.orig/modules/Users/ListView.php htdocs/modules/Users/ListView.php --- htdocs.orig/modules/Users/ListView.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/ListView.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,82 +1,82 @@ -query($list_query); -//Retreive the Navigation array -$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); - -$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); -$smarty->assign("MOD", return_module_language($current_language,'Settings')); -$smarty->assign("CMOD", $mod_strings); -$smarty->assign("APP", $app_strings); -$smarty->assign("CURRENT_USERID", $current_user->id); -$smarty->assign("IMAGE_PATH",$image_path); -$smarty->assign("CATEGORY",$category); -$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); -$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); -$smarty->assign("USER_COUNT",$no_of_users); -$smarty->assign("RECORD_COUNTS", $record_string); -$smarty->assign("NAVIGATION", $navigationOutput); -$smarty->assign("USER_IMAGES",getUserImageNames()); -if($_REQUEST['ajax'] !='') - $smarty->display("UserListViewContents.tpl"); -else - $smarty->display("UserListView.tpl"); - -?> +query($list_query); +//Retreive the Navigation array +$navigation_array = getNavigationValues($start, $adb->num_rows($list_result), $no_of_users['user']); + +$navigationOutput = getTableHeaderNavigation($navigation_array, $url_string,"Administration","index",''); +$smarty->assign("MOD", return_module_language($current_language,'Settings')); +$smarty->assign("CMOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("CURRENT_USERID", $current_user->id); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("CATEGORY",$category); +$smarty->assign("LIST_HEADER",getListViewHeader($focus,"Users",$url_string,$sorder,$order_by,"","")); +$smarty->assign("LIST_ENTRIES",getListViewEntries($focus,"Users",$list_result,$navigation_array,"","","EditView","Delete","")); +$smarty->assign("USER_COUNT",$no_of_users); +$smarty->assign("RECORD_COUNTS", $record_string); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("USER_IMAGES",getUserImageNames()); +if($_REQUEST['ajax'] !='') + $smarty->display("UserListViewContents.tpl"); +else + $smarty->display("UserListView.tpl"); + +?> diff -ruN htdocs.orig/modules/Users/Logout.php htdocs/modules/Users/Logout.php --- htdocs.orig/modules/Users/Logout.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Logout.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,109 +1,109 @@ -query($query); - $num_rows = $adb->num_rows($result); - if($num_rows > 0) - { - $ftpserver = $adb->query_result($result,0,'server'); - $ftpuser = $adb->query_result($result,0,'server_username'); - $ftppassword = $adb->query_result($result,0,'server_password'); - } - - //Taking the Backup of DB - $currenttime=date("Ymd_His"); - if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') - { $backupFileName="backup_".$currenttime.".sql"; - save_structure($backupFileName, $root_directory); - $source_file=$backupFileName; - ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); - if(file_exists($source_file)) unlink($source_file); - - } -} -// Recording Logout Info - $usip=$_SERVER['REMOTE_ADDR']; - $outtime=date("Y/m/d H:i:s"); - $loghistory=new LoginHistory(); - $loghistory->user_logout($current_user->user_name,$usip,$outtime); - - -$local_log =& LoggerManager::getLogger('Logout'); - -//Calendar Logout -//include('modules/Calendar/logout.php'); - -// clear out the autthenticating flag -session_destroy(); - -define("IN_LOGIN", true); - -// define('IN_PHPBB', true); -// include($phpbb_root_path . 'extension.inc'); -// include($phpbb_root_path . 'common.'.$phpEx); - -// -// Set page ID for session management -// -//$userdata = session_pagestart($user_ip, PAGE_LOGIN); -//init_userprefs($userdata); -// -// End session management -// - -// session id check -/* -if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) -{ - $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; -} -else -{ - $sid = ''; -} -if( $userdata['session_logged_in'] ) - { - if( $userdata['session_logged_in'] ) - { - session_end($userdata['session_id'], $userdata['user_id']); - } - - } -*/ -// go to the login screen. -header("Location: index.php?action=Login&module=Users"); -?> +query($query); + $num_rows = $adb->num_rows($result); + if($num_rows > 0) + { + $ftpserver = $adb->query_result($result,0,'server'); + $ftpuser = $adb->query_result($result,0,'server_username'); + $ftppassword = $adb->query_result($result,0,'server_password'); + } + + //Taking the Backup of DB + $currenttime=date("Ymd_His"); + if($ftpserver != '' && $ftpuser != '' && $ftppassword != '') + { $backupFileName="backup_".$currenttime.".sql"; + save_structure($backupFileName, $root_directory); + $source_file=$backupFileName; + ftpBackupFile($source_file, $ftpserver, $ftpuser, $ftppassword); + if(file_exists($source_file)) unlink($source_file); + + } +} +// Recording Logout Info + $usip=$_SERVER['REMOTE_ADDR']; + $outtime=date("Y/m/d H:i:s"); + $loghistory=new LoginHistory(); + $loghistory->user_logout($current_user->user_name,$usip,$outtime); + + +$local_log =& LoggerManager::getLogger('Logout'); + +//Calendar Logout +//include('modules/Calendar/logout.php'); + +// clear out the autthenticating flag +session_destroy(); + +define("IN_LOGIN", true); + +// define('IN_PHPBB', true); +// include($phpbb_root_path . 'extension.inc'); +// include($phpbb_root_path . 'common.'.$phpEx); + +// +// Set page ID for session management +// +//$userdata = session_pagestart($user_ip, PAGE_LOGIN); +//init_userprefs($userdata); +// +// End session management +// + +// session id check +/* +if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) +{ + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; +} +else +{ + $sid = ''; +} +if( $userdata['session_logged_in'] ) + { + if( $userdata['session_logged_in'] ) + { + session_end($userdata['session_id'], $userdata['user_id']); + } + + } +*/ +// go to the login screen. +header("Location: index.php?action=Login&module=Users"); +?> diff -ruN htdocs.orig/modules/Users/Save.php htdocs/modules/Users/Save.php --- htdocs.orig/modules/Users/Save.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Users/Save.php 2007-05-09 01:01:55.000000000 +0200 @@ -1,168 +1,168 @@ -query($query); - if($adb->num_rows($result) > 0) - { - echo 'User Name Already Exists!'; - die; - }else - { - echo 'SUCCESS'; - die; - } -} - -if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); -elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); - -$focus = new Users(); -if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') -{ - $focus->mode='edit'; - $focus->id = $_REQUEST["record"]; -} -else -{ - $focus->mode=''; -} - - -if($_REQUEST['changepassword'] == 'true') -{ - $focus->retrieve_entity_info($_REQUEST['record'],'Users'); - $focus->id = $_REQUEST['record']; -if (isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $old_pass = $_POST['old_password']; - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -} - - -//save user Image -if(! $_REQUEST['changepassword'] == 'true') -{ - if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') - { - $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); - header("Location: index.php?module=Users&action=Logout"); - exit; - } - - if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; - //Code contributed by mike crowe for rearrange the home page and tab - if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; - if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; - - setObjectValuesFromRequest(&$focus); - $focus->saveentity("Users"); - //$focus->imagename = $image_upload_array['imagename']; - $focus->saveHomeOrder($focus->id); - $return_id = $focus->id; - -if (isset($_POST['user_name']) && isset($_POST['new_password'])) { - $new_pass = $_POST['new_password']; - $new_passwd = $_POST['new_password']; - $new_pass = md5($new_pass); - $uname = $_POST['user_name']; - if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { - - header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); - exit; -} -} - -if(isset($focus->id) && $focus->id != '') -{ - - if(isset($_POST['user_role'])) - { - updateUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name']) && $_POST['group_name'] != '') - { - updateUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} -else -{ - if(isset($_POST['user_role'])) - { - insertUser2RoleMapping($_POST['user_role'],$focus->id); - } - if(isset($_POST['group_name'])) - { - insertUsers2GroupMapping($_POST['group_name'],$focus->id); - } -} - -//Creating the Privileges Flat File -require_once('modules/Users/CreateUserPrivilegeFile.php'); -createUserPrivilegesfile($focus->id); -createUserSharingPrivilegesfile($focus->id); - -} -if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; -else $return_module = "Users"; -if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; -else $return_action = "DetailView"; -if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; -if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; -if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; - -$log->debug("Saved record with id of ".$return_id); - - - -if($_REQUEST['modechk'] == 'prefview') - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); -else - header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); - - -?> +query($query); + if($adb->num_rows($result) > 0) + { + echo 'User Name Already Exists!'; + die; + }else + { + echo 'SUCCESS'; + die; + } +} + +if (isset($_POST['record']) && !is_admin($current_user) && $_POST['record'] != $current_user->id) echo ("Unauthorized access to user administration."); +elseif (!isset($_POST['record']) && !is_admin($current_user)) echo ("Unauthorized access to user administration."); + +$focus = new Users(); +if(isset($_REQUEST["record"]) && $_REQUEST["record"] != '') +{ + $focus->mode='edit'; + $focus->id = $_REQUEST["record"]; +} +else +{ + $focus->mode=''; +} + + +if($_REQUEST['changepassword'] == 'true') +{ + $focus->retrieve_entity_info($_REQUEST['record'],'Users'); + $focus->id = $_REQUEST['record']; +if (isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $old_pass = $_POST['old_password']; + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['old_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +} + + +//save user Image +if(! $_REQUEST['changepassword'] == 'true') +{ + if(strtolower($current_user->is_admin) == 'off' && $current_user->id != $focus->id) + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + if(strtolower($current_user->is_admin) == 'off' && isset($_POST['is_admin']) && strtolower($_POST['is_admin']) == 'on') + { + $log->fatal("SECURITY:Non-Admin ". $current_user->id . " attempted to change is_admin settings for user:". $focus->id); + header("Location: index.php?module=Users&action=Logout"); + exit; + } + + if (!isset($_POST['is_admin'])) $_REQUEST["is_admin"] = 'off'; + //Code contributed by mike crowe for rearrange the home page and tab + if (!isset($_POST['deleted'])) $_REQUEST["deleted"] = '0'; + if (!isset($_POST['homeorder']) || $_POST['homeorder'] == "" ) $_REQUEST["homeorder"] = 'ILTI,QLTQ,ALVT,PLVT,CVLVT,HLT,OLV,GRT,OLTSO'; + + setObjectValuesFromRequest(&$focus); + $focus->saveentity("Users"); + //$focus->imagename = $image_upload_array['imagename']; + $focus->saveHomeOrder($focus->id); + $return_id = $focus->id; + +if (isset($_POST['user_name']) && isset($_POST['new_password'])) { + $new_pass = $_POST['new_password']; + $new_passwd = $_POST['new_password']; + $new_pass = md5($new_pass); + $uname = $_POST['user_name']; + if (!$focus->change_password($_POST['confirm_new_password'], $_POST['new_password'])) { + + header("Location: index.php?action=Error&module=Users&error_string=".urlencode($focus->error_string)); + exit; +} +} + +if(isset($focus->id) && $focus->id != '') +{ + + if(isset($_POST['user_role'])) + { + updateUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name']) && $_POST['group_name'] != '') + { + updateUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} +else +{ + if(isset($_POST['user_role'])) + { + insertUser2RoleMapping($_POST['user_role'],$focus->id); + } + if(isset($_POST['group_name'])) + { + insertUsers2GroupMapping($_POST['group_name'],$focus->id); + } +} + +//Creating the Privileges Flat File +require_once('modules/Users/CreateUserPrivilegeFile.php'); +createUserPrivilegesfile($focus->id); +createUserSharingPrivilegesfile($focus->id); + +} +if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module']; +else $return_module = "Users"; +if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action']; +else $return_action = "DetailView"; +if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id']; +if(isset($_REQUEST['activity_mode'])) $activitymode = '&activity_mode='.$_REQUEST['activity_mode']; +if(isset($_POST['parenttab'])) $parenttab = $_POST['parenttab']; + +$log->debug("Saved record with id of ".$return_id); + + + +if($_REQUEST['modechk'] == 'prefview') + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); +else + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab"); + + +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/Products/Delete.php htdocs/modules/Products/Delete.php --- htdocs.orig/modules/Products/Delete.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/Delete.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,40 +1,40 @@ - + diff -ruN htdocs.orig/modules/Products/DetailViewAjax.php htdocs/modules/Products/DetailViewAjax.php --- htdocs.orig/modules/Products/DetailViewAjax.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Products/DetailViewAjax.php 2007-05-09 01:03:12.000000000 +0200 @@ -1,50 +1,50 @@ -retrieve_entity_info($crmid,"Products"); - $modObj->column_fields[$fieldname] = $fieldvalue; - if($fieldname == 'unit_price')//unit price converted to dollar value while saving - { - $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); - } - $modObj->id = $crmid; - $modObj->mode = "edit"; - $modObj->save("Products"); - if($modObj->id != "") - { - echo ":#:SUCCESS"; - }else - { - echo ":#:FAILURE"; - } - }else - { - echo ":#:FAILURE"; - } -} -?> +retrieve_entity_info($crmid,"Products"); + $modObj->column_fields[$fieldname] = $fieldvalue; + if($fieldname == 'unit_price')//unit price converted to dollar value while saving + { + $modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue); + } + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Products"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} +?> -------------- next part -------------- diff -ruN htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php --- htdocs.orig/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/PurchaseOrder/ListTopPurchaseOrder.php 2007-05-09 01:04:34.000000000 +0200 @@ -1,125 +1,125 @@ -$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries - */ -function getTopPurchaseOrder() -{ - require_once("data/Tracker.php"); - require_once('modules/PurchaseOrder/PurchaseOrder.php'); - require_once('include/logging.php'); - require_once('include/ListView/ListView.php'); - require_once('include/database/PearDatabase.php'); - require_once('include/ComboUtil.php'); - require_once('include/utils/utils.php'); - require_once('modules/CustomView/CustomView.php'); - - global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; - $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); - - $log = LoggerManager::getLogger('po_list'); - - $url_string = ''; - $sorder = ''; - $oCustomView = new CustomView("PurchaseOrder"); - $customviewcombo_html = $oCustomView->getCustomViewCombo(); - if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') - { - if($oCustomView->setdefaultviewid != "") - { - $viewid = $oCustomView->setdefaultviewid; - }else - { - $viewid = "0"; - } - } - $focus = new PurchaseOrder(); - - $theme_path="themes/".$theme."/"; - $image_path=$theme_path."images/"; - - //Retreive the list from Database - //<<<<<<<<>>>>>>>> - $date_var = date('Y-m-d'); - - $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; - $query = getListQuery("PurchaseOrder",$where); - $query .=" ORDER BY total DESC"; - - //<<<<<<<>>>>>>>> - - $list_result = $adb->limitQuery($query,0,5); - - //Retreiving the no of rows - $noofrows = $adb->num_rows($list_result); - - //Retreiving the start value from request - if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') - { - $start = $_REQUEST['start']; - } - else - { - - $start = 1; - } - - //Retreive the Navigation array - $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); - - if ($navigation_array['start'] == 1) - { - if($noofrows != 0) - $start_rec = $navigation_array['start']; - else - $start_rec = 0; - if($noofrows > $list_max_entries_per_page) - { - $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; - } - else - { - $end_rec = $noofrows; - } - - } - else - { - if($navigation_array['next'] > $list_max_entries_per_page) - { - $start_rec = $navigation_array['next'] - $list_max_entries_per_page; - $end_rec = $navigation_array['next'] - 1; - } - else - { - $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; - $end_rec = $noofrows; - } - } - - - //Retreive the List View Table Header - $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); - $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); - - $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); - $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); - if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) - return $values; -} -?> - +$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries + */ +function getTopPurchaseOrder() +{ + require_once("data/Tracker.php"); + require_once('modules/PurchaseOrder/PurchaseOrder.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + require_once('include/database/PearDatabase.php'); + require_once('include/ComboUtil.php'); + require_once('include/utils/utils.php'); + require_once('modules/CustomView/CustomView.php'); + + global $current_language,$current_user,$list_max_entries_per_page,$theme,$adb; + $current_module_strings = return_module_language($current_language, 'PurchaseOrder'); + + $log = LoggerManager::getLogger('po_list'); + + $url_string = ''; + $sorder = ''; + $oCustomView = new CustomView("PurchaseOrder"); + $customviewcombo_html = $oCustomView->getCustomViewCombo(); + if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') + { + if($oCustomView->setdefaultviewid != "") + { + $viewid = $oCustomView->setdefaultviewid; + }else + { + $viewid = "0"; + } + } + $focus = new PurchaseOrder(); + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + //Retreive the list from Database + //<<<<<<<<>>>>>>>> + $date_var = date('Y-m-d'); + + $where = ' and vtiger_crmentity.smownerid='.$current_user->id.' and vtiger_purchaseorder.duedate >= \''.$date_var.'\''; + $query = getListQuery("PurchaseOrder",$where); + $query .=" ORDER BY total DESC"; + + //<<<<<<<>>>>>>>> + + $list_result = $adb->limitQuery($query,0,5); + + //Retreiving the no of rows + $noofrows = $adb->num_rows($list_result); + + //Retreiving the start value from request + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + { + $start = $_REQUEST['start']; + } + else + { + + $start = 1; + } + + //Retreive the Navigation array + $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); + + if ($navigation_array['start'] == 1) + { + if($noofrows != 0) + $start_rec = $navigation_array['start']; + else + $start_rec = 0; + if($noofrows > $list_max_entries_per_page) + { + $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; + } + else + { + $end_rec = $noofrows; + } + + } + else + { + if($navigation_array['next'] > $list_max_entries_per_page) + { + $start_rec = $navigation_array['next'] - $list_max_entries_per_page; + $end_rec = $navigation_array['next'] - 1; + } + else + { + $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; + $end_rec = $noofrows; + } + } + + + //Retreive the List View Table Header + $title=array('myTopPurchaseOrders.gif',$current_module_strings['LBL_MY_TOP_PO'],'home_mytoppo'); + $listview_header = getListViewHeader($focus,"PurchaseOrder",$url_string,$sorder,$order_by,"HomePage",$oCustomView); + + $listview_entries = getListViewEntries($focus,"PurchaseOrder",$list_result,$navigation_array,"HomePage","","EditView","Delete",$oCustomView); + $values=Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries); + if ( ($display_empty_home_blocks && $noofrows == 0 ) || ($noofrows>0) ) + return $values; +} +?> + -------------- next part -------------- diff -ruN htdocs.orig/modules/Potentials/language/en_us.lang.php htdocs/modules/Potentials/language/en_us.lang.php --- htdocs.orig/modules/Potentials/language/en_us.lang.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Potentials/language/en_us.lang.php 2007-05-09 01:05:32.000000000 +0200 @@ -1,153 +1,153 @@ -'Potentials', -'LBL_MODULE_TITLE'=>'Potentials: Home', -'LBL_SEARCH_FORM_TITLE'=>'Potential Search', -'LBL_LIST_FORM_TITLE'=>'Potential List', -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_OPPORTUNITY'=>'Potential:', -'LBL_NAME'=>'Potential Name', -'LBL_INVITEE'=>'Contacts', -'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', -'LBL_LIST_ACCOUNT_NAME'=>'Account Name', -'LBL_PRODUCT_NAME'=>'Product Name', -'LBL_LIST_AMOUNT'=>'Amount', -'LBL_LIST_DATE_CLOSED'=>'Expected Close', -'LBL_LIST_SALES_STAGE'=>'Sales Stage', - -'LBL_OPPORTUNITY_NAME'=>'Potential Name:', -'LBL_ACCOUNT_NAME'=>'Account Name:', -'LBL_AMOUNT'=>'Amount:', -'LBL_DATE_CLOSED'=>'Expected Close Date:', -'LBL_TYPE'=>'Type:', -'LBL_NEXT_STEP'=>'Next Step:', -'LBL_LEAD_SOURCE'=>'Lead Source:', -'LBL_SALES_STAGE'=>'Sales Stage:', -'LBL_PROBABILITY'=>'Probability (%):', -'LBL_DESCRIPTION'=>'Description:', -'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', -'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', -'LBL_CUSTOM_INFORMATION'=>'Custom Information', - -'LBL_NEW_FORM_TITLE'=>'New Potential', - -'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", -'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", - -'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', - -'NTC_NONE_SCHEDULED'=>'None scheduled.', - -'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', -'LBL_GENERAL_INFORMATION'=>'General Information', - - - -//for v4 release added -'LBL_NEW_POTENTIAL'=>'New Potential', -'LBL_POTENTIAL_TITLE'=>'Potentials', - -'LBL_NEW_TASK'=>'New Task', -'LBL_TASK_TITLE'=>'Tasks', -'LBL_NEW_CALL'=>'New Call', -'LBL_CALL_TITLE'=>'Calls', -'LBL_NEW_MEETING'=>'New Meeting', -'LBL_MEETING_TITLE'=>'Meetings', -'LBL_NEW_EMAIL'=>'New Email', -'LBL_EMAIL_TITLE'=>'Emails', -'LBL_NEW_NOTE'=>'New Note', -'LBL_NOTE_TITLE'=>'Notes', - -'LBL_NEW_ATTACHMENT'=>'New Attachment', -'LBL_ATTACHMENT_TITLE'=>'Attachments', - -'LBL_NEW_CONTACT'=>'New Contact', -'LBL_CONTACT_TITLE'=>'Contacts', - -//Added vtiger_fields after RC1 - Release -'LBL_ALL'=>'All', -'LBL_WON'=>'Won', -'LBL_LOST'=>'Lost', -'LBL_VALUE_PROPOSITION'=>'Value Proposition', -'LBL_PROSPECTING'=>'Prospecting', - -// Added for 4GA -'LBL_TOOL_FORM_TITLE'=>'Potential Tools', -//Added for 4GA -'Potential Name'=>'Potential Name', -'Amount'=>'Amount', -'Account Name'=>'Account Name', -'Currency'=>'Currency', -'Expected Close Date'=>'Expected Close Date', -'Opportunity Type'=>'Opportunity Type', -'Type'=>'Type', -'Next Step'=>'Next Step', -'Lead Source'=>'Lead Source', -'Sales Stage'=>'Sales Stage', -'Assigned To'=>'Assigned To', -'Probability'=>'Probability (%)', -'Campaign Source'=>'Campaign Source', -'Description'=>'Description', -'Created Time'=>'Created Time', -'Modified Time'=>'Modified Time', -'Organization unit'=>'Organization unit', -//Added for 4.2 Release -- CustomView -'Potential'=>'Potential', -'Expected Close'=>'Expected Close', - -//Added for Existing Picklist Strings - -'Prospecting'=>'Prospecting', -'Qualification'=>'Qualification', -'Needs Analysis'=>'Needs Analysis', -'Value Proposition'=>'Value Proposition', -'Id. Decision Makers'=>'Id. Decision Makers', -'Perception Analysis'=>'Perception Analysis', -'Proposal/Price Quote'=>'Proposal/Price Quote', -'Negotiation/Review'=>'Negotiation/Review', -'Closed Won'=>'Closed Won', -'Closed Lost'=>'Closed Lost', - -'Cold Call'=>'Cold Call', -'Existing Customer'=>'Existing Customer', -'Self Generated'=>'Self Generated', -'Employee'=>'Employee', -'Partner'=>'Partner', -'Public Relations'=>'Public Relations', -'Direct Mail'=>'Direct Mail', -'Conference'=>'Conference', -'Trade Show'=>'Trade Show', -'Web Site'=>'Web Site', -'Word of mouth'=>'Word of mouth', -'Other'=>'Other', - -'--None--'=>'--None--', -'Existing Business'=>'Existing Business', -'New Business'=>'New Business', - - - -); - -?> +'Potentials', +'LBL_MODULE_TITLE'=>'Potentials: Home', +'LBL_SEARCH_FORM_TITLE'=>'Potential Search', +'LBL_LIST_FORM_TITLE'=>'Potential List', +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_OPPORTUNITY'=>'Potential:', +'LBL_NAME'=>'Potential Name', +'LBL_INVITEE'=>'Contacts', +'LBL_LIST_OPPORTUNITY_NAME'=>'Potential', +'LBL_LIST_ACCOUNT_NAME'=>'Account Name', +'LBL_PRODUCT_NAME'=>'Product Name', +'LBL_LIST_AMOUNT'=>'Amount', +'LBL_LIST_DATE_CLOSED'=>'Expected Close', +'LBL_LIST_SALES_STAGE'=>'Sales Stage', + +'LBL_OPPORTUNITY_NAME'=>'Potential Name:', +'LBL_ACCOUNT_NAME'=>'Account Name:', +'LBL_AMOUNT'=>'Amount:', +'LBL_DATE_CLOSED'=>'Expected Close Date:', +'LBL_TYPE'=>'Type:', +'LBL_NEXT_STEP'=>'Next Step:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_SALES_STAGE'=>'Sales Stage:', +'LBL_PROBABILITY'=>'Probability (%):', +'LBL_DESCRIPTION'=>'Description:', +'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information:', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +'LBL_NEW_FORM_TITLE'=>'New Potential', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.", +'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials", + +'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', + +'NTC_NONE_SCHEDULED'=>'None scheduled.', + +'LBL_SELECT_OPPOPTUNITY'=>'Select Potential', +'LBL_GENERAL_INFORMATION'=>'General Information', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Potential', +'LBL_POTENTIAL_TITLE'=>'Potentials', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Note', +'LBL_NOTE_TITLE'=>'Notes', + +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_ATTACHMENT_TITLE'=>'Attachments', + +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_WON'=>'Won', +'LBL_LOST'=>'Lost', +'LBL_VALUE_PROPOSITION'=>'Value Proposition', +'LBL_PROSPECTING'=>'Prospecting', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Potential Tools', +//Added for 4GA +'Potential Name'=>'Potential Name', +'Amount'=>'Amount', +'Account Name'=>'Account Name', +'Currency'=>'Currency', +'Expected Close Date'=>'Expected Close Date', +'Opportunity Type'=>'Opportunity Type', +'Type'=>'Type', +'Next Step'=>'Next Step', +'Lead Source'=>'Lead Source', +'Sales Stage'=>'Sales Stage', +'Assigned To'=>'Assigned To', +'Probability'=>'Probability (%)', +'Campaign Source'=>'Campaign Source', +'Description'=>'Description', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Organization unit'=>'Organization unit', +//Added for 4.2 Release -- CustomView +'Potential'=>'Potential', +'Expected Close'=>'Expected Close', + +//Added for Existing Picklist Strings + +'Prospecting'=>'Prospecting', +'Qualification'=>'Qualification', +'Needs Analysis'=>'Needs Analysis', +'Value Proposition'=>'Value Proposition', +'Id. Decision Makers'=>'Id. Decision Makers', +'Perception Analysis'=>'Perception Analysis', +'Proposal/Price Quote'=>'Proposal/Price Quote', +'Negotiation/Review'=>'Negotiation/Review', +'Closed Won'=>'Closed Won', +'Closed Lost'=>'Closed Lost', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', +'Other'=>'Other', + +'--None--'=>'--None--', +'Existing Business'=>'Existing Business', +'New Business'=>'New Business', + + + +); + +?> -------------- next part -------------- diff -ruN htdocs.orig/parent_tabdata.php htdocs/parent_tabdata.php --- htdocs.orig/parent_tabdata.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/parent_tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,13 +1,21 @@ 'My Home Page',2=>'Marketing',3=>'Sales',4=>'Support',5=>'Analytics',6=>'Inventory',7=>'Tools',8=>'Settings'); -$parent_child_tab_rel_array=array(1=>array(3,9,28,),2=>array(26,6,4,28,7,9,8,),3=>array(7,6,4,2,20,22,23,14,19,8,9,),4=>array(13,15,6,4,14,8,28,9,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(30,31,),); +$parent_child_tab_rel_array=array(1=>array(3,9,10,),2=>array(26,6,4,),3=>array(7,6,4,2,20,22,23,14,19,8,),4=>array(13,15,6,4,14,8,),5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),7=>array(24,27,8,),8=>array(),); -?> \ No newline at end of file +?> diff -ruN htdocs.orig/tabdata.php htdocs/tabdata.php --- htdocs.orig/tabdata.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/tabdata.php 2007-05-09 01:53:46.000000000 +0200 @@ -1,15 +1,17 @@ 3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,'Organization'=>30,'OrgUnit'=>31,); - -$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,'29'=>0,'30'=>0,'31'=>0,); - -$tab_ownedby_array=array('3'=>1,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>1,'9'=>0,'10'=>1,'13'=>0,'14'=>1,'1'=>1,'15'=>1,'16'=>0,'18'=>1,'19'=>1,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>1,'25'=>1,'26'=>0,'27'=>1,'28'=>1,'29'=>1,'30'=>0,'31'=>0,); - -$action_id_array=array('Save'=>0,'EditView'=>1,'Delete'=>2,'index'=>3,'DetailView'=>4,'Import'=>5,'Export'=>6,'Merge'=>8,'VendorEditView'=>1,'VendorDetailView'=>4,'SaveVendor'=>0,'DeleteVendor'=>2,'PriceBookEditView'=>1,'PriceBookDetailView'=>4,'SavePriceBook'=>0,'DeletePriceBook'=>2,'ConvertLead'=>9,'DetailViewAjax'=>1,'TagCloud'=>4,'QuickCreate'=>1,'Popup'=>3); +$tab_info_array=array('Home'=>3,'Leads'=>7,'Accounts'=>6,'Contacts'=>4,'Potentials'=>2,'Notes'=>8,'Calendar'=>9,'Emails'=>10,'HelpDesk'=>13,'Products'=>14,'Dashboard'=>1,'Faq'=>15,'Events'=>16,'Vendors'=>18,'PriceBooks'=>19,'Quotes'=>20,'PurchaseOrder'=>21,'SalesOrder'=>22,'Invoice'=>23,'Rss'=>24,'Reports'=>25,'Campaigns'=>26,'Portal'=>27,'Webmails'=>28,'Users'=>29,); -$action_name_array=array(0=>'Save',1=>'EditView',2=>'Delete',3=>'index',4=>'DetailView',5=>'Import',6=>'Export',8=>'Merge',9=>'ConvertLead'); -?> \ No newline at end of file +$tab_seq_array=array('3'=>0,'7'=>0,'6'=>0,'4'=>0,'2'=>0,'8'=>0,'9'=>0,'10'=>0,'13'=>0,'14'=>0,'1'=>0,'15'=>0,'16'=>2,'18'=>0,'19'=>0,'20'=>0,'21'=>0,'22'=>0,'23'=>0,'24'=>0,'25'=>0,'26'=>0,'27'=>0,'28'=>0,); +?> -------------- next part -------------- diff -ruN htdocs.orig/themes/alphagrey/header.php htdocs/themes/alphagrey/header.php --- htdocs.orig/themes/alphagrey/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/alphagrey/header.php 2007-05-09 01:56:53.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/bluelagoon/header.php htdocs/themes/bluelagoon/header.php --- htdocs.orig/themes/bluelagoon/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/bluelagoon/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> diff -ruN htdocs.orig/themes/woodspice/header.php htdocs/themes/woodspice/header.php --- htdocs.orig/themes/woodspice/header.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/themes/woodspice/header.php 2007-05-09 01:59:13.000000000 +0200 @@ -1,90 +1,90 @@ -assign("HEADERS",$header_array); -$smarty->assign("THEME",$theme); -$smarty->assign("IMAGEPATH",$image_path); - -$qc_modules = getQuickCreateModules(); -$smarty->assign("QCMODULE", $qc_modules); -$smarty->assign("APP", $app_strings); - -$cnt = count($qc_modules); -$smarty->assign("CNT", $cnt); - -$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); - -$smarty->assign("MODULE_NAME", $currentModule); - -$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); - -$smarty->assign("CURRENT_USER", $current_user->user_name); - -$smarty->assign("CURRENT_USER_ID", $current_user->id); -$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); -$smarty->assign("CATEGORY",getParentTab()); -$smarty->assign("CALC",get_calc($image_path)); -$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); -$smarty->assign("ANNOUNCEMENT",get_announcements()); - +assign("HEADERS",$header_array); +$smarty->assign("THEME",$theme); +$smarty->assign("IMAGEPATH",$image_path); + +$qc_modules = getQuickCreateModules(); +$smarty->assign("QCMODULE", $qc_modules); +$smarty->assign("APP", $app_strings); + +$cnt = count($qc_modules); +$smarty->assign("CNT", $cnt); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +$smarty->assign("MODULE_NAME", $currentModule); + +$smarty->assign("DATE", getDisplayDate(date("Y-m-d H:i"))); + +$smarty->assign("CURRENT_USER", $current_user->user_name); + +$smarty->assign("CURRENT_USER_ID", $current_user->id); +$smarty->assign("MODULELISTS",$app_list_strings['moduleList']); +$smarty->assign("CATEGORY",getParentTab()); +$smarty->assign("CALC",get_calc($image_path)); +$smarty->assign("QUICKACCESS",getAllParenttabmoduleslist()); +$smarty->assign("ANNOUNCEMENT",get_announcements()); + $smarty->assign("CURRENT_ORGANIZATION",$current_organization); $org_array=array(); $org=strtok( $user_organizations, "|"); @@ -95,28 +95,28 @@ $smarty->assign("USER_ORGANIZATIONS",$org_array); $smarty->assign("USER_ORGANIZATIONS_COUNT",count($org_array)); $smarty->assign("CHGORGOK",$org_change_ok); - - -if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); - - - -$module_path="modules/".$currentModule."/"; - -require_once('include/Menu.php'); - -//Assign the entered global search string to a variable and display it again -if($_REQUEST['query_string'] != '') - $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); -else - $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); - -global $module_menu; - - -require_once('data/Tracker.php'); -$tracFocus=new Tracker(); -$list = $tracFocus->get_recently_viewed($current_user->id); -$smarty->assign("TRACINFO",$list); -$smarty->display("Header.tpl"); -?> + + +if (is_admin($current_user)) $smarty->assign("ADMIN_LINK", "".$app_strings['LBL_SETTINGS'].""); + + + +$module_path="modules/".$currentModule."/"; + +require_once('include/Menu.php'); + +//Assign the entered global search string to a variable and display it again +if($_REQUEST['query_string'] != '') + $smarty->assign("QUERY_STRING",$_REQUEST['query_string']); +else + $smarty->assign("QUERY_STRING","$app_strings[LBL_SEARCH_STRING]"); + +global $module_menu; + + +require_once('data/Tracker.php'); +$tracFocus=new Tracker(); +$list = $tracFocus->get_recently_viewed($current_user->id); +$smarty->assign("TRACINFO",$list); +$smarty->display("Header.tpl"); +?> From weigelt at metux.de Thu May 10 08:20:49 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:20:49 +0200 Subject: [Vtigercrm-developers] [PATCH] __toString() fix Message-ID: <20070510152049.GB25395@nibiru.local> Hi folks, there were some __toString() methods necessary ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN cleaned/data/CRMEntity.php working/data/CRMEntity.php --- cleaned/data/CRMEntity.php 2007-05-03 17:50:00.000000000 +0200 +++ working/data/CRMEntity.php 2007-05-03 23:38:06.000000000 +0200 @@ -25,10 +25,16 @@ require_once('data/Tracker.php'); require_once('include/utils/utils.php'); require_once('include/utils/UserInfoUtil.php'); - -class CRMEntity -{ - /** + +class CRMEntity +{ + /* generic toString() method added by nekrad */ + function __toString() + { + return serialize($this); + } + + /** * This method implements a generic insert and update logic for any SugarBean * This method only works for subclasses that implement the same variable names. * This method uses the presence of an id vtiger_field that is not null to signify and update. diff -ruN cleaned/modules/Users/Users.php working/modules/Users/Users.php --- cleaned/modules/Users/Users.php 2007-05-04 02:32:05.000000000 +0200 +++ working/modules/Users/Users.php 2007-05-04 02:59:03.000000000 +0200 @@ -163,6 +163,11 @@ $this->log->debug("Exiting Users() method ..."); } + function __toString() + { + return "[[USERS]]"; + } + // Mike Crowe Mod --------------------------------------------------------Default ordering for us /** * Function to get sort order From weigelt at metux.de Thu May 10 08:21:41 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:21:41 +0200 Subject: [Vtigercrm-developers] [PATCH] remove noise in invoice module Message-ID: <20070510152141.GC25395@nibiru.local> Hi folks, this patch removes some noise in the invoice module ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN orig/include/js/Inventory.js htdocs/include/js/Inventory.js --- orig/include/js/Inventory.js 2007-05-04 16:11:48.000000000 +0200 +++ htdocs/include/js/Inventory.js 2007-05-08 21:51:32.000000000 +0200 @@ -225,8 +225,8 @@ var max_row_count = document.getElementById('proTab').rows.length; max_row_count = eval(max_row_count)-2;//As the table has two header rows, we will reduce two from table row length - if(!FindDuplicate()) - return false; +// if(!FindDuplicate()) +// return false; if(max_row_count == 0) { @@ -357,12 +357,12 @@ } } } - if(duplicate) - { - //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); - if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) - return false; - } +// if(duplicate) +// { +// //alert("You have selected < "+duplicate_products+" > more than once in line items "+positions+".\n It is advisable to select the product just once but change the Qty. Thank You"); +// if(!confirm(alert_arr.SELECTED_MORE_THAN_ONCE+"\n"+duplicate_products+"\n "+alert_arr.WANT_TO_CONTINUE)) +// return false; +// } return true; } From weigelt at metux.de Thu May 10 08:26:38 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Thu, 10 May 2007 17:26:38 +0200 Subject: [Vtigercrm-developers] [PATCH] render API v1 Message-ID: <20070510152638.GD25395@nibiru.local> Hi folks, here're some patches to introduce my new preprint rendering API. For now there's just an latex backend, but adding more should be quite simple. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/lib/render/README htdocs/lib/render/README --- htdocs.orig/lib/render/README 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/README 2007-05-09 13:53:10.000000000 +0200 @@ -0,0 +1 @@ +This subdirectory contains the TeX rendering stuff. diff -ruN htdocs.orig/lib/render/RenderFactory.php htdocs/lib/render/RenderFactory.php --- htdocs.orig/lib/render/RenderFactory.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/RenderFactory.php 2007-05-09 17:05:57.000000000 +0200 @@ -0,0 +1,64 @@ +engine = $e; + } + + function __toString() + { + return "Unknown Engine: \"".$this->engine."\""; + } +} + +class E_Render_FormatNotSupportedByEngine extends Exception +{ + var $engine; + var $format; + + function E_Render_FormatNotSupportedByEngine($format,$engine) + { + $this->format = $format; + $this->engine = $engine; + } + + function __toString() + { + return "Format \"".$this->format. + "\" not supported by engine \"". + $this->engine. + "\""; + } +} + +class RenderFactory +{ + /* public static */ function getRenderer_Invoice($param) + { + if (!($f = $param{'format'})) + throw new Exception("missing output format"); + if (!($e = $param{'engine'})) + throw new Exception("missing engine"); + + switch ($e) + { + case 'pdflatex': + { + if ($f != 'application/pdf') + throw new E_Render_FormatNotSupportedByEngine($f,$e); + + require_once(RENDER_LIB_PREFIX.'TexRender_Invoice.php'); + return new TexRender_Invoice($param); + } + default: + throw new E_Render_UnknownEngine($e); + } + } +} diff -ruN htdocs.orig/lib/render/TexEncode.php htdocs/lib/render/TexEncode.php --- htdocs.orig/lib/render/TexEncode.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/lib/render/TexEncode.php 2007-05-10 02:51:50.000000000 +0200 @@ -0,0 +1,101 @@ + + +*/ + +// NOTE: the webserver needs *write* acccess to this directory +// we normally take the session storage dir +define('TEXRENDER_TMP_MASK', '{SESSION.SAVE_PATH}/texrender-{SESSION.ID}-{NAME}'); +define('TEXRENDER_TEMPLATE_DIR', 'templates/tex/{TEMPLATE-NAME}/'); + +require_once(RENDER_LIB_PREFIX.'TexEncode.php'); + +class TexRender_Invoice +{ + /* private */ var $tmpmask; + /* private */ var $data; + /* private */ var $product_items; + /* private */ var $fn_tex; + /* private */ var $fn_pdf; + /* private */ var $fn_template; + /* private */ var $key; + + /* private */ function _tmpname($name) + { + return str_replace('{SESSION.NAME}', session_name(), + str_replace('{SESSION.ID}', session_id(), + str_replace('{SESSION.SAVE_PATH}', realpath(ini_get('session.save_path')), + str_replace('{NAME}', $name, + $this->tmpmask + )))); + } + + /* private */ function _test_write_access() + { + $fn = $this->_tmpname('write-test'); + if (!($fp=fopen($fn,"w"))) + throw new Exception("write-test: could not open file for writing: $fn"); + fputs($fp,"TEST123"); + fclose($fp); + + $res = trim(implode('',file($fn))); + if ($res != "TEST123") + throw new Exception("write-test: reading test data failed for file: $fn"); + + unlink($fn); + + return true; + } + + function TexRender_Invoice($param) + { + // test write access and otherwise failed + $this->tmpmask = TEXRENDER_TMP_MASK; + + // should be already cought by the factory, but just to be sure + if ($param{'format'} != 'application/pdf') + throw new Exception("fomat not supported by this renderer: ".$param{'format'}); + + if (!$param{'template'}) + throw new Exception("missing template name"); + + $this->template_name = $param{'template'}; + $this->data = array(); + $this->_test_write_access(); + $this->key = md5(serialize(gettimeofday)); + $this->fn_tex = $this->_tmpname($this->key.'.tex'); + $this->fn_pdf = $this->_tmpname($this->key.'.pdf'); + $this->template_dir= realpath(str_replace('{TEMPLATE-NAME}', $this->template_name,TEXRENDER_TEMPLATE_DIR)); + $this->fn_template_main = $this->template_dir.'/invoice/main.texi'; + $this->fn_template_item = $this->template_dir.'/invoice/item.texi'; + + $inc = $this->template_dir.'/config.php'; + if (!include($inc)) + throw new Exception("could not load config: $inc"); + + if (!is_array($this->config = $tex_template_config)) + throw new Exception("missing template config"); + + if (!$this->config{'lang'}) + throw new Exception("language not set in template config"); + } + + function addData($par) + { + foreach($par as $walk => $cur) + $this->data{$walk} = $cur; + } + + function checkProductItem($item) + { + if (!$item{'name'}) + throw new Exception("missing item name"); + if (!$item{'amount'}) + throw new Exception("missing amount"); + if (!is_numeric($item{'amount'})) + throw new Exception("amount must be numeric"); + if (!$item{'price'}) + throw new Exception("missing price"); + if (!is_numeric($item{'price'})) + throw new Exception("price must be numeric"); + if (($item{'discount'})&&($item{'discount'} != 0)) + throw new Exception("discount not supported yet by this renderer"); + if (!is_numeric($item{'tax_percent'})) + throw new Exception("tax_percent must be numeric"); + } + + function checkData() + { + if ((!is_array($this->_product_items)) || + (!count($this->_product_items))) + throw new Exception("no product items"); + + if (!$this->data{'ident'}) + throw new Exception("missing ident"); + } + + /* public */ function addProductItem($item) + { + // check for correct items + $this->checkProductItem($item); + + // calculate some stuff if necessary + if (!$item{'total'}) + $item{'total'} = $item{'price'} * $item{'amount'}; + if (!$item{'taxes'}) + $item{'taxes'} = $item{'total'} * $item{'tax_percent'}; + if (!$item{'topay'}) + $item{'topay'} = $item{'total'} + $item{'taxes'}; + + $this->_product_items[] = $item; + } + + /* public String */ function getOutputContentType() + { + return 'application/pdf'; + } + + /* private String */ function _generate_tex() + { + if (!($tmpl_main = implode('',file($this->fn_template_main)))) + throw new Exception("could not load main template: ".$this->fn_template_main); + if (!($tmpl_item = implode('',file($this->fn_template_item)))) + throw new Exception("could not load item template: ".$this->fn_template_item); + + // generate the item list + foreach ($this->_product_items as $walk => $cur) + { + $items .= + str_replace('::Item:Name::', $cur{'name'}, + str_replace('::Item:Price::', TexEncode::money($cur{'price'}), + str_replace('::Item:Amount::', $cur{'amount'}, + str_replace('::Item:Taxrate::', $cur{'tax_percent'}, + str_replace('::Item:Description::', $cur{'description'}, + str_replace('::Item:Comment::', trim($cur{'comment'}), + str_replace('::Item:Discount::', TexEncode::money($cur{'discount'}), + str_replace('::Item:Total::', TexEncode::money($cur{'total'}), + str_replace('::Item:Taxes::', TexEncode::money($cur{'taxes'}), + str_replace('::Item:Topay::', TexEncode::money($cur{'topay'}), + $tmpl_item)))))))))); + + $all_total += $cur{'total'}; + $all_taxes += $cur{'taxes'}; + $all_topay += $cur{'topay'}; + } + + $content = + str_replace('::TemplateDir::', $this->template_dir, + str_replace('::Items::', $items, + str_replace('::Bill:Ident::', $this->data{'ident'}, + str_replace('::Bill:Total::', TexEncode::money($all_total), + str_replace('::Bill:Taxes::', TexEncode::money($all_taxes), + str_replace('::Bill:Topay::', TexEncode::money($all_topay), + str_replace('::Company:Addr:Street::', $this->data{'company:addr:street'}, + str_replace('::Company:Addr:PCode::', $this->data{'company:addr:pcode'}, + str_replace('::Company:Addr:City::', $this->data{'company:addr:city'}, + str_replace('::Company:Addr:Country::', $this->data{'company:addr:country'}, + str_replace('::Company:Addr:State::', $this->data{'company:addr:state'}, + str_replace('::Company:Phone::', $this->data{'company:phone'}, + str_replace('::Company:Fax::', $this->data{'company:fax'}, + str_replace('::Company:Website::', $this->data{'company:website'}, + str_replace('::Customer:Name::', $this->data{'customer:name'}, + str_replace('::Customer:Addr:Street::', TexEncode::text($this->data{'billing:addr:street'}), + str_replace('::Customer:Addr:PCode::', TexEncode::text($this->data{'billing:addr:pcode'}), + str_replace('::Customer:Addr:City::', TexEncode::text($this->data{'billing:addr:city'}), + str_replace('::Customer:Addr:State::', TexEncode::text($this->data{'billing:addr:state'}), + str_replace('::Customer:Addr:Country::', TexEncode::text($this->data{'billing:addr:country'}), + $tmpl_main)))))))))))))))))))); + + return $content; + } + + /* public */ function generate() + { + $this->checkData(); + $tex = $this->_generate_tex(); + @unlink($this->fn_tex); + if (!($fp_tex = fopen($this->fn_tex,"w"))) + throw new Exception("could not open tex source file: ".$this->fn_tex); + + fputs($fp_tex,$tex); + fclose($fp_tex); + + $cmd = 'cd '.dirname($this->fn_tex).' && pdflatex '.$this->fn_tex; + `$cmd` ; `$cmd` ; // call it twice for table calculations + } + + // send appropriate http headers and output file + /* public */ function sendHTTPOutput() + { + $this->generate(); + Header("Content-Type: ".$this->getOutputContentType()); + readfile($this->fn_pdf); + } +} -------------- next part -------------- diff -ruN htdocs.orig/modules/Invoice/CreatePDF.php htdocs/modules/Invoice/CreatePDF.php --- htdocs.orig/modules/Invoice/CreatePDF.php 2007-05-09 00:56:25.000000000 +0200 +++ htdocs/modules/Invoice/CreatePDF.php 2007-05-10 15:30:08.000000000 +0200 @@ -9,67 +9,36 @@ * ********************************************************************************/ - -require_once('include/fpdf/pdf.php'); -require_once('include/fpdf/pdfconfig.php'); require_once('modules/Invoice/Invoice.php'); require_once('modules/Organization/Organization.php'); require_once('include/database/PearDatabase.php'); require_once('include/utils/EditViewUtils.php'); +require_once('lib/render/RenderFactory.php'); -global $adb,$app_strings,$focus; -global $log; - -// for template checking ... -$tmpl_dirs = array( "firstpage", "pages", "lastpage"); -$tmpl_files = array( "header.php", "body.php", "footer.php"); +global $adb,$app_strings,$focus,$log; $sql="select currency_symbol from vtiger_currency_info"; $result = $adb->query($sql); $currency_symbol = $adb->query_result($result,0,'currency_symbol'); -// would you like and end page? 1 for yes 0 for no -$endpage="1"; - $id = $_REQUEST['record']; //retreiving the vtiger_invoice info $focus = new Invoice(); $focus->retrieve_entity_info($_REQUEST['record'],"Invoice"); -$account_name = getAccountName($focus->column_fields[account_id]); -$invoice_no = $focus->column_fields[invoice_no]; // **************** BEGIN POPULATE DATA ******************** - -// populate data if($focus->column_fields["salesorder_id"] != '') $so_name = getSoName($focus->column_fields["salesorder_id"]); else $so_name = ''; $po_name = $focus->column_fields["purchaseorder"]; -$valid_till = $focus->column_fields["duedate"]; -$valid_till = getDisplayDate($valid_till); -$bill_street = $focus->column_fields["bill_street"]; -$bill_city = $focus->column_fields["bill_city"]; -$bill_state = $focus->column_fields["bill_state"]; -$bill_code = $focus->column_fields["bill_code"]; -$bill_country = $focus->column_fields["bill_country"]; - -$contact_name =getContactName($focus->column_fields["contact_id"]); -$ship_street = $focus->column_fields["ship_street"]; -$ship_city = $focus->column_fields["ship_city"]; -$ship_state = $focus->column_fields["ship_state"]; -$ship_code = $focus->column_fields["ship_code"]; -$ship_country = $focus->column_fields["ship_country"]; - -$conditions = from_html($focus->column_fields["terms_conditions"]); -$description = from_html($focus->column_fields["description"]); -$status = $focus->column_fields["invoicestatus"]; - // Company information -$crmid = $focus->column_fields["record_id"]; +if (!($crmid = $focus->column_fields["record_id"])) + throw new Exception("crmid is null/empty"); + $org_query = "select organizationname from vtiger_entity2org where crmid='".$crmid."'"; $result = $adb->query($org_query); $org_rows = $adb->num_rows($result); @@ -82,7 +51,7 @@ $org_name = $adb->query_result($result,0,"organizationname"); } else { $log->info( $module. " '".$crmid."' not assigned to any organization"); - exit(); + throw new Exception("crmid $crmid not assigned to any organisation (org_name=$org_name)"); } // get organization/orgunit details @@ -92,68 +61,11 @@ $log->debug( "Here we are: getOrgUnits( $organization, $orgunitid);"); $orgunittab = getOrgUnits( $organization, $orgunitid); -if( is_array( $orgunittab[$orgunitid])) { - $orgdetails = $orgunittab[$orgunitid]; - $org_name = $orgdetails["name"]; - $org_address = $orgdetails["address"]; - $org_city = $orgdetails["city"]; - $org_state = $orgdetails["state"]; - $org_country = $orgdetails["country"]; - $org_code = $orgdetails["code"]; - $org_phone = $orgdetails["phone"]; - $org_fax = $orgdetails["fax"]; - $org_website = $orgdetails["website"]; - $logo_name = $orgdetails["logoname"]; - $template = $orgdetails["invoice_template"]; -} else { - $log->info( $module. " '".$crmid."' organization/orgunitid mismatch"); - exit(); -} - -// Check the template -if( $template == "") - $template = "Default"; - -if( $template != "Default") { - foreach( $tmpl_dirs as $dir) { - foreach( $tmpl_files as $file) { - if( !file_exists( "modules/".$module."/pdf_templates/".$template."/".$dir."/".$file)) { - $log->info( $module. " '".$crmid."' organization/orgunitid template '".$template."' is incomplete"); - $log->info("Missing file: modules/".$module."/pdf_templates/".$template."/".$dir."/".$file); - $log->info("Fallback to the Default template"); - $template = "Default"; - break 2; - } - } - } -} -//NOTE : Removed currency symbols and added with Grand Total text. it is enough to show the currency symbol in one place - -//we can also get the NetTotal, Final Discount Amount/Percent, Adjustment and GrandTotal from the array $associated_products[1]['final_details'] - -//getting the Net Total -$price_subtotal = number_format($focus->column_fields["hdnSubTotal"],2,'.',','); - -//Final discount amount/percentage -$discount_amount = $focus->column_fields["hdnDiscountAmount"]; -$discount_percent = $focus->column_fields["hdnDiscountPercent"]; - -if($discount_amount != "") - $price_discount = number_format($discount_amount,2,'.',','); -else if($discount_percent != "") -{ - //This will be displayed near Discount label - used in include/fpdf/templates/body.php - $final_price_discount_percent = "(".number_format($discount_percent,2,'.',',')." %)"; - $price_discount = number_format((($discount_percent*$focus->column_fields["hdnSubTotal"])/100),2,'.',','); -} -else - $price_discount = "0.00"; - -//Adjustment -$price_adjustment = number_format($focus->column_fields["txtAdjustment"],2,'.',','); -//Grand Total -$price_total = number_format($focus->column_fields["hdnGrandTotal"],2,'.',','); +if(!is_array( $orgunittab[$orgunitid])) + throw new Exception("org/orgunitid mismatch"); +$orgdetails = $orgunittab[$orgunitid]; +$template = $orgdetails["invoice_template"]; //get the Associated Products for this Invoice $focus->id = $focus->column_fields["record_id"]; @@ -166,6 +78,8 @@ //To calculate the group tax amount if($final_details['taxtype'] == 'group') { + throw new Exception("group tax not supported"); + $group_tax_total = $final_details['tax_totalamount']; $price_salestax = number_format($group_tax_total,2,'.',','); @@ -191,47 +105,37 @@ $sh_tax_amount = $final_details['shtax_totalamount']; $price_shipping_tax = number_format($sh_tax_amount,2,'.',','); +$render = RenderFactory::getRenderer_Invoice(array +( + format => 'application/pdf', + engine => 'pdflatex', + template => 'default' +)); //This is to get all prodcut details as row basis -for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++) +for($i=1;$i<=$num_products;$i++) { - $product_name[$i] = $associated_products[$i]['productName'.$i]; - $prod_description[$i] = $associated_products[$i]['productDescription'.$i]; - $product_id[$i] = $associated_products[$i]['hdnProductId'.$i]; - $qty[$i] = $associated_products[$i]['qty'.$i]; - $unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',','); - $list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',','); - $list_pricet[$i] = $associated_products[$i]['listPrice'.$i]; - $discount_total[$i] = $associated_products[$i]['discountTotal'.$i]; - //aded for 5.0.3 pdf changes - $product_code[$i] = $associated_products[$i]['hdnProductcode'.$i]; - - $taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i]; - - $producttotal = $taxable_total; - $total_taxes = '0.00'; if($focus->column_fields["hdnTaxType"] == "individual") { - $total_tax_percent = '0.00'; - //This loop is to get all tax percentage and then calculate the total of all taxes - for($tax_count=0;$tax_countaddProductItem(array + ( + code => $associated_products[$i]['hdnProductcode'.$i], + name => $associated_products[$i]['productName'.$i], + amount => $associated_products[$i]['qty'.$i], + price => $associated_products[$i]['listPrice'.$i], + unit_price => $associated_products[$i]['unitPrice'.$i], + discount => $associated_products[$i]['discountTotal'.$i], + tax_percent => (integer)($tax_percent)/100, + description => $associated_products[$i]['productDescription'.$i], + comment => $associated_products[$i]['comment'.$i] + )); // Product piecelists $query = "SELECT vtiger_crmentity.crmid, @@ -245,86 +149,46 @@ INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_products.productid WHERE vtiger_crmentity.deleted = 0 - AND vtiger_products2products_rel.productid = ".$product_id[$i]." + AND vtiger_products2products_rel.productid = ".$product_id." AND vtiger_products2products_rel.relation_type = 10"; $result = $adb->query($query); $pieces = $adb->num_rows($result); if( $pieces > 0) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = "consisting of:"; - $product_line[$j]["Qty"] = ""; - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - for( $pl=0; $pl<$pieces; $pl++) { - $product_line[++$j]["Product Name"] = ""; - $product_line[$j]["Description"] = - $adb->query_result( $result, $pl, "productname"); - $product_line[$j]["Qty"] = - $adb->query_result( $result, $pl, "quantity"); - $product_line[$j]["Price"] = ""; - $product_line[$j]["Discount"] = ""; - $product_line[$j]["Total"] = ""; - } + throw new Exception("multiple pieces not yet supported !"); } } -//echo '
Product Details ==>';print_r($product_line);echo '
'; -//echo '
';print_r($associated_products);echo '
'; - // ************************ END POPULATE DATA ***************************8 -$page_num='1'; -$pdf = new PDF( 'P', 'mm', 'A4' ); -$pdf->Open(); - -$num_pages=ceil(count($product_line)/$products_per_page); - - -$current_product=0; -for($l=0;$l<$num_pages;$l++) -{ - $line=array(); - if($num_pages == $page_num) - $lastpage=1; - - while($current_product != $page_num*$products_per_page) - { - $line[]=$product_line[$current_product]; - $current_product++; - } - - //if bottom > 145 then we skip the Description and T&C in every - //page and display only in lastpage - //if you want to display the description and T&C in each page then - //set the display_desc_tc='true' and bottom <= 145 in pdfconfig.php - $pdf->AddPage(); - if( $page_num == "1") { - include("pdf_templates/".$template."/firstpage/header.php"); - include("pdf_templates/".$template."/firstpage/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/firstpage/footer.php"); - } else { - include("pdf_templates/".$template."/pages/header.php"); - include("pdf_templates/".$template."/pages/body.php"); - if($display_desc_tc == 'true' && $bottom <= 145) - include("pdf_templates/".$template."/pages/footer.php"); - } - - $page_num++; - - if (($endpage) && ($lastpage)) - { - $pdf->AddPage(); - include("pdf_templates/".$template."/lastpage/header.php"); - include("pdf_templates/".$template."/lastpage/body.php"); - include("pdf_templates/".$template."/lastpage/footer.php"); - } -} - - -$pdf->Output('Invoice-'.$crmid.'.pdf','D'); //added file name to make it work in IE, also forces the download giving the user the option to save +$render->addData(array +( + 'valid_until' => $focus->column_fields["duedate"], + 'description' => from_html($focus->column_fields["description"]), + 'conditions' => from_html($focus->column_fields["terms_conditions"]), + 'tax_type' => $focus->column_fields['hdnTaxType'], + 'ident' => $focus->column_fields['invoice_no'], + 'contact:name' => getContactName($focus->column_fields["contact_id"]), + 'company:name' => $orgdetails["name"], + 'company:addr:city' => $orgdetails["city"], + 'company:addr:pcode' => $orgdetails["code"], + 'company:addr:street' => $orgdetails["address"], + 'company:addr:country' => $orgdetails["country"], + 'company:addr:state' => $orgdetails["state"], + 'company:phone' => $orgdetails["phone"], + 'company:fax' => $orgdetails["fax"], + 'company:website' => $orgdetails["website"], + 'customer:name' => getAccountName($focus->column_fields[account_id]), + 'shipping:addr:city' => $focus->column_fields["ship_city"], + 'shipping:addr:pcode' => $focus->column_fields["ship_code"], + 'shipping:addr:street' => $focus->column_fields["ship_street"], + 'shipping:addr:country' => $ship_country = $focus->column_fields["ship_country"], + 'shipping:addr:state' => $focus->column_fields["ship_state"], + 'billing:addr:city' => $focus->column_fields["bill_city"], + 'billing:addr:pcode' => $focus->column_fields["bill_code"], + 'billing:addr:street' => $focus->column_fields["bill_street"], + 'billing:addr:country' => $focus->column_fields["bill_country"], + 'billing:addr:state' => $focus->column_fields["bill_state"] +)); -// Added to fix annoying bug that includes HTML in your PDF +$render->sendHTTPOutput(); exit(); -?> -------------- next part -------------- diff -ruN htdocs.orig/templates/tex/default/config.php htdocs/templates/tex/default/config.php --- htdocs.orig/templates/tex/default/config.php 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/config.php 2007-05-09 20:00:54.000000000 +0200 @@ -0,0 +1,7 @@ + 'de', + 'tex2pdf' => 'pdflatex' +); diff -ruN htdocs.orig/templates/tex/default/invoice/item.texi htdocs/templates/tex/default/invoice/item.texi --- htdocs.orig/templates/tex/default/invoice/item.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/item.texi 2007-05-10 14:25:30.000000000 +0200 @@ -0,0 +1,2 @@ +::Item:Name:: \ifempty{::Item:Comment::}{}{(::Item:Comment::)} & ::Item:Price:: \Euro & ::Item:Amount:: & ::Item:Total:: \Euro \\ +\hline diff -ruN htdocs.orig/templates/tex/default/invoice/main.texi htdocs/templates/tex/default/invoice/main.texi --- htdocs.orig/templates/tex/default/invoice/main.texi 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/invoice/main.texi 2007-05-10 14:15:53.000000000 +0200 @@ -0,0 +1,53 @@ +\def\ResourcePrefix{::TemplateDir::/resource} +\input \ResourcePrefix/bill.tex + +\def\ifempty#1#2#3{\def\inner{#1}\ifx\inner\empty + #2\else #3\fi } + +\begin{document} + \letterInit + \begin{letter}{% + ::Customer:Addr:Street:: \ \\ + ::Customer:Addr:PCode::\ ::Customer:Addr:City:: \ \\ + \ \\[\medskipamount] + } + + \opening{\Large Ihre Rechnung:\normalsize~~~ ::Bill:Ident:: +%% ~~~~~~~~~~vom:~~::BillDate:: + } + + \setlength\LTleft{0pt} + \setlength\LTright{72pt} + \begin{longtable}{|p{300pt}|r|r|r|} + \hline + Leistung & Preis & Menge & Summe \\ + \hline + \endhead + \hline + \hline + \multicolumn{3}{|l|}{Rechnungsbetrag} & ::Bill:Total:: \Euro \\ + \hline + \multicolumn{3}{|l|}{Umsatzsteuer} & ::Bill:Taxes:: \Euro \\ + \hline + \hline + \multicolumn{3}{|l|}{Gesamt} & ::Bill:Topay:: \Euro \\ + \hline + \noalign{ + \vspace{12pt} + \small + Soweit nicht anders angegeben entspricht das Lieferdatum + dem Rechnungsdatum + } + \noalign{ + \vspace{12pt} + \normalsize + Bitte {\"u}berweisen Sie den f{\"a}lligen Betrag binnen + 10~Tagen auf eines unserer Konten. \newline + Die Ware bleibt bis zur vollst{\"a}ndigen Bezahlung Eigentum + von metux IT service. + } + \endlastfoot + ::Items:: + \end{longtable} + \end{letter} +\end{document} diff -ruN htdocs.orig/templates/tex/default/resource/bill.tex htdocs/templates/tex/default/resource/bill.tex --- htdocs.orig/templates/tex/default/resource/bill.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/bill.tex 2007-05-09 23:55:35.000000000 +0200 @@ -0,0 +1,22 @@ +\input{\ResourcePrefix/metux.tex} + +\documentclass[a4paper,bottom=0cm,fromalign=center,fromlogo=true]{scrlttr2} +\usepackage{epsfig} +\usepackage{longtable} + +\usepackage{ngerman} +\usepackage[latin1]{inputenc} +%usepackage{fancyhdr} +%pagestyle{fancy} + +% brief-init +\newcommand\letterInit{% + \captionsgerman + \dategerman + \firsthead{\metuxHeader} + \firstfoot{\metuxFooter} + \setkomavar{fromname}{metux IT service} + \setkomavar{fromaddress}{Heydaer Stra{\ss}e 23, 99338 Plaue} +} + +\newcommand\Euro{Euro} diff -ruN htdocs.orig/templates/tex/default/resource/header.eps htdocs/templates/tex/default/resource/header.eps --- htdocs.orig/templates/tex/default/resource/header.eps 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.eps 2002-09-17 01:45:21.000000000 +0200 @@ -0,0 +1,178 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: header.eps +%%Creator: fig2dev Version 3.2 Patchlevel 3d +%%CreationDate: Tue Jul 30 18:35:09 2002 +%%For: ems at nibiru.metux.de () +%%BoundingBox: 0 0 643 88 +%%Magnification: 1.0000 +%%EndComments +/$F2psDict 200 dict def +$F2psDict begin +$F2psDict /mtrx matrix put +/col-1 {0 setgray} bind def +/col0 {0.000 0.000 0.000 srgb} bind def +/col1 {0.000 0.000 1.000 srgb} bind def +/col2 {0.000 1.000 0.000 srgb} bind def +/col3 {0.000 1.000 1.000 srgb} bind def +/col4 {1.000 0.000 0.000 srgb} bind def +/col5 {1.000 0.000 1.000 srgb} bind def +/col6 {1.000 1.000 0.000 srgb} bind def +/col7 {1.000 1.000 1.000 srgb} bind def +/col8 {0.000 0.000 0.560 srgb} bind def +/col9 {0.000 0.000 0.690 srgb} bind def +/col10 {0.000 0.000 0.820 srgb} bind def +/col11 {0.530 0.810 1.000 srgb} bind def +/col12 {0.000 0.560 0.000 srgb} bind def +/col13 {0.000 0.690 0.000 srgb} bind def +/col14 {0.000 0.820 0.000 srgb} bind def +/col15 {0.000 0.560 0.560 srgb} bind def +/col16 {0.000 0.690 0.690 srgb} bind def +/col17 {0.000 0.820 0.820 srgb} bind def +/col18 {0.560 0.000 0.000 srgb} bind def +/col19 {0.690 0.000 0.000 srgb} bind def +/col20 {0.820 0.000 0.000 srgb} bind def +/col21 {0.560 0.000 0.560 srgb} bind def +/col22 {0.690 0.000 0.690 srgb} bind def +/col23 {0.820 0.000 0.820 srgb} bind def +/col24 {0.500 0.190 0.000 srgb} bind def +/col25 {0.630 0.250 0.000 srgb} bind def +/col26 {0.750 0.380 0.000 srgb} bind def +/col27 {1.000 0.500 0.500 srgb} bind def +/col28 {1.000 0.630 0.630 srgb} bind def +/col29 {1.000 0.750 0.750 srgb} bind def +/col30 {1.000 0.880 0.880 srgb} bind def +/col31 {1.000 0.840 0.000 srgb} bind def + +end +save +newpath 0 88 moveto 0 0 lineto 643 0 lineto 643 88 lineto closepath clip newpath +-4.5 96.9 translate +1 -1 scale + +/cp {closepath} bind def +/ef {eofill} bind def +/gr {grestore} bind def +/gs {gsave} bind def +/sa {save} bind def +/rs {restore} bind def +/l {lineto} bind def +/m {moveto} bind def +/rm {rmoveto} bind def +/n {newpath} bind def +/s {stroke} bind def +/sh {show} bind def +/slc {setlinecap} bind def +/slj {setlinejoin} bind def +/slw {setlinewidth} bind def +/srgb {setrgbcolor} bind def +/rot {rotate} bind def +/sc {scale} bind def +/sd {setdash} bind def +/ff {findfont} bind def +/sf {setfont} bind def +/scf {scalefont} bind def +/sw {stringwidth} bind def +/tr {translate} bind def +/tnt {dup dup currentrgbcolor + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add + 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} + bind def +/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul + 4 -2 roll mul srgb} bind def +/reencdict 12 dict def /ReEncode { reencdict begin +/newcodesandnames exch def /newfontname exch def /basefontname exch def +/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def +basefontdict { exch dup /FID ne { dup /Encoding eq +{ exch dup length array copy newfont 3 1 roll put } +{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall +newfont /FontName newfontname put newcodesandnames aload pop +128 1 255 { newfont /Encoding get exch /.notdef put } for +newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat +newfontname newfont definefont pop end } def +/isovec [ +8#055 /minus 8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde +8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis +8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron +8#220 /dotlessi 8#230 /oe 8#231 /OE +8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling +8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis +8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot +8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus +8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph +8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine +8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf +8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute +8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring +8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute +8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute +8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve +8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply +8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex +8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave +8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring +8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute +8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute +8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve +8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide +8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex +8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def +/Courier-Bold /Courier-Bold-iso isovec ReEncode +/Times-Bold /Times-Bold-iso isovec ReEncode +/Times-Roman /Times-Roman-iso isovec ReEncode +/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def +/$F2psEnd {$F2psEnteredState restore end} def + +$F2psBegin +10 setmiterlimit + 0.06000 0.06000 sc +% +% Fig objects follow +% +/Times-Roman-iso ff 150.00 scf sf +6600 1200 m +gs 1 -1 sc (www.metux.de) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 825 m +gs 1 -1 sc (+49 36207 51833) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 675 m +gs 1 -1 sc (+49 174 7066481) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +6600 1350 m +gs 1 -1 sc (contact @ metux.de) col8 sh gr +/Courier-Bold-iso ff 180.00 scf sf +1650 750 m +gs 1 -1 sc (Ihr innovativer IT-Dienstleister) col25 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 1200 m +gs 1 -1 sc ( Internet) col0 sh gr +/Times-Bold-iso ff 150.00 scf sf +5700 675 m +gs 1 -1 sc ( Telephon) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1350 m +gs 1 -1 sc (Advance Bank \(BLZ 702 300 00\), Kto-Nr: 200 72 64 206) col8 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1575 m +gs 1 -1 sc (Enrico Weigelt, Steuer-Nr: 154/286/05931) col8 sh gr +/Times-Bold-iso ff 300.00 scf sf +75 750 m +gs 1 -1 sc (metux ITS) col9 sh gr +/Courier-Bold-iso ff 150.00 scf sf +150 1350 m +gs 1 -1 sc (Bankverbindung:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +750 1575 m +gs 1 -1 sc (Inhaber:) col0 sh gr +/Courier-Bold-iso ff 150.00 scf sf +225 1125 m +gs 1 -1 sc (Hausanschrift:) col0 sh gr +/Times-Roman-iso ff 150.00 scf sf +1650 1125 m +gs 1 -1 sc (Heydaer Strasse 23 99338 Plaue) col8 sh gr +/Times-Roman-iso ff 180.00 scf sf +10125 300 m +gs 1 -1 sc (tricktext) col0 sh gr +$F2psEnd +rs diff -ruN htdocs.orig/templates/tex/default/resource/header.fig htdocs/templates/tex/default/resource/header.fig --- htdocs.orig/templates/tex/default/resource/header.fig 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/header.fig 2002-09-17 01:44:26.000000000 +0200 @@ -0,0 +1,24 @@ +#FIG 3.2 +Landscape +Center +Inches +A4 +100.00 +Single +-2 +1200 2 +4 0 0 893 -1 14 10 -0.0000 4 135 1350 150 1350 Bankverbindung:\001 +4 0 0 890 -1 14 10 -0.0000 4 105 1260 225 1125 Hausanschrift:\001 +4 0 9 918 -1 2 20 0.0000 4 150 1005 75 750 metux ITS\001 +4 0 25 969 -1 14 12 -0.0000 4 135 3360 1650 750 Ihr innovativer IT-Dienstleister\001 +4 0 0 942 -1 2 10 0.0000 4 135 750 5700 675 Telephon\001 +4 0 8 991 -1 0 10 0.0000 4 105 1050 6600 675 +49 174 7066481\001 +4 0 8 997 -1 0 10 0.0000 4 105 1050 6600 825 +49 36207 51833\001 +4 0 8 999 -1 0 10 0.0000 4 105 990 6600 1200 www.metux.de\001 +4 0 0 946 -1 2 10 0.0000 4 105 765 5700 1200 Internet\001 +4 0 8 888 -1 0 10 0.0000 4 135 1935 1650 1125 Heydaer Strasse 23 99338 Plaue\001 +4 0 8 987 -1 0 10 0.0000 4 135 1230 6600 1350 contact @ metux.de\001 +4 0 8 933 -1 0 10 0.0000 4 135 3435 1650 1350 Advance Bank (BLZ 702 300 00), Kto-Nr: 200 72 64 206\001 +4 0 0 50 0 0 12 0.0000 4 135 645 10125 300 tricktext\001 +4 0 0 893 -1 14 10 0.0000 4 105 720 750 1575 Inhaber:\001 +4 0 8 933 -1 0 10 0.0000 4 135 2415 1650 1575 Enrico Weigelt, Steuer-Nr: 154/286/05931\001 diff -ruN htdocs.orig/templates/tex/default/resource/metux.tex htdocs/templates/tex/default/resource/metux.tex --- htdocs.orig/templates/tex/default/resource/metux.tex 1970-01-01 01:00:00.000000000 +0100 +++ htdocs/templates/tex/default/resource/metux.tex 2007-05-09 23:56:59.000000000 +0200 @@ -0,0 +1,76 @@ +% Variablen .... % +\def\metuxSignature{\epsfig{file=\ResourcePrefix/signature.png}} +\def\metuxName{metux IT service} +\def\metuxPhone{+49-36207-519931} +\def\metuxFax{+49-36207-519932} +\def\metuxEmail{weigelt at metux.de} +\def\metuxUrl{www.metux.de} +\def\metuxAddress{Heydaer Stra{\ss}e 23, 99338 Plaue} +\def\metuxBankAccount{0972596900} +\def\metuxBankCompany{Dresdner Bank AG} +\def\metuxBankCode{82080000} +\def\metuxBank{Kto: \metuxBankAccount, BLZ: \metuxBankCode, \metuxBankCompany} +\def\metuxStrnr{154/286/05931} +\def\metuxOwner{Enrico Weigelt} + +\def\nl{\ \\} +\def\metuxGeomLeft{2cm} +\def\metuxGeomRight{2cm} +\def\metuxGeomBottom{1cm} +\def\metuxGeomHead{1cm} +\def\metuxGeomTop{0.5cm} + +\newcommand\metuxFooter +{ + \hrule + ~\newline + \parbox[l]{180pt}{ + \small + \metuxName \\ + Inh. \metuxOwner \\ + \metuxAddress \\ + StNr: \metuxStrnr + } + \parbox[l]{180pt}{ + \small + Bankverbindung: \\ + Kto: \metuxBankAccount \\ + BLZ: \metuxBankCode \\ + \metuxBankCompany + } + \parbox[l]{180pt}{ + \small + Tel: \metuxPhone \\ + Fax: \metuxFax \\ + eMail: \metuxEmail \\ + WWW: \metuxUrl + } +} + +\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.png}} +%\newcommand\metuxHeader{\epsfig{file=\ResourcePrefix/logo.eps}} +\newcommand\metuxInit{ + \renewcommand{\headrulewidth}{0.5pt} + \renewcommand{\footrulewidth}{0.5pt} + \cfoot{\metuxFooter} + \chead{\metuxHeader} +} + +% \newcommand\Euro{Euro} + +\def\metuxMFG{% + \noindent Mit freundlichem Gru\ss + + \epsfig{\metuxSignature} + + \noindent Enrico Weigelt \\ + metux IT service +} + +\def\metuxMFGpriv{% + \noindent Mit freundlichem Gru\ss + + \metuxSignature + + \noindent Enrico Weigelt +} From amvandemore at gmail.com Thu May 10 12:59:44 2007 From: amvandemore at gmail.com (Adam Vande More) Date: Thu, 10 May 2007 14:59:44 -0500 Subject: [Vtigercrm-developers] Custom Integration with website Message-ID: <6201873e0705101259w1eb599d0xd5fcbb0916cb546c@mail.gmail.com> I have written our contact us page to insert the customer's information directly into vtiger as a lead. I am aware that the webforms add on does the same thing but I elected to write my own script. The script inserts data into tables: vtiger_crmentity vtiger_leaddetails vtiger_leadaddress vtiger_leadscf vtiger_leadsubdetails vtiger_crmentity_seq - increments the value In testing this appears to work just fine, however it occurs to me that I may have missed some possible constraints in the db that could result in data integrity issues if i didn't do this correctly. Are there any other tables that should be updated or any other areas I should be worried about? Also the webforms source seems exceedingly complex for a relatively simple task and it's too abstracted for me to be able to read easily. I'm not sure if it's doing checks that I should implement too. Does anyone have any insight into this? -- Adam Vande More Systems Administrator Mobility Sales -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/6318a0f8/attachment-0005.html From weigelt at metux.de Thu May 10 17:13:35 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 02:13:35 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() Message-ID: <20070511001335.GA5640@nibiru.local> Hi folks, as we sometimes get some errors like: # Fatal error: Call to a member function Move() on a non-object # in .../include/database/PearDatabase.php on line 443 Obviously sometimes the query_result() method is called with an non-existing result object. This patch adds an check which throws an exception on missing result object, so we can easily track it down. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 @@ -438,6 +438,8 @@ function query_result(&$result, $row, $col=0) { //$this->println("ADODB query_result r=".$row." c=".$col); + if (!is_object($result)) + throw new Exception("result is not an object"); $result->Move($row); $rowdata = $this->change_key_case($result->FetchRow()); //$this->println($rowdata); From jorge.torres.maldonado at gmail.com Thu May 10 17:31:24 2007 From: jorge.torres.maldonado at gmail.com (Jorge Torres) Date: Thu, 10 May 2007 20:31:24 -0400 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <530c7d700705101731q8704acw53e1e2f0e7bfc03f@mail.gmail.com> THis one I like, thank you very much On 5/10/07, Enrico Weigelt wrote: > > > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070510/152bcf4f/attachment-0003.html From weigelt at metux.de Thu May 10 18:13:10 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:13:10 +0200 Subject: [Vtigercrm-developers] [PATCH] some new $adb (PearDatabase) methods Message-ID: <20070511011310.GA19509@nibiru.local> Hi folks, this patch adds two new functions to the PearDatabase ($adb) class: * sql_concat(array): generates an sql expression for field concatenations, based on selected RDBMS. * run_query_field(string): executes an given SQL query and returns only the first field of the first record. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php --- htdocs.orig/include/database/PearDatabase.php 2007-05-11 02:17:06.000000000 +0200 +++ htdocs/include/database/PearDatabase.php 2007-05-11 02:55:29.000000000 +0200 @@ -434,6 +434,31 @@ return $this->change_key_case($result->FetchRow()); } + function sql_concat($list) + { + switch ($this->dbType) + { + case 'mysql': + return 'concat('.implode(',',$list).')'; + case 'pgsql': + return '('.implode('||',$list).')'; + default: + throw new Exception("unsupported dbtype \"".$this->dbType."\""); + } + } + + function run_query_field($sql) + { + $this->checkConnection(); + $result = $this->database->Execute($sql); + + if (!is_object($result)) + throw new Exception("query failed: $sql"); + + $row = $result->FetchRow(); + return array_shift($row); + } + /* ADODB newly added. replacement for mysql_result() */ function query_result(&$result, $row, $col=0) { From weigelt at metux.de Thu May 10 18:32:07 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 03:32:07 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) Message-ID: <20070511013207.GB19509@nibiru.local> Hi folks, the leads module (Tracker.php) suffers from an sql bug: it uses mysql specific sql statements for concatenating fields. This ends up in empty result objects and so the already mentioned error of trying to call Move() on non-object. This patch solves this by using the new PearDatabas::sql_concat() function (see prev. patch) for creating the statement. Also this patch calls the new PearDatabase::run_query_field() for the one-field-query. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- -------------- next part -------------- diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 @@ -80,18 +80,23 @@ $entityidfield = $adb->query_result($result,0,'entityidfield'); if(!(strpos($fieldsname,',') === false)) { - $fieldlists = explode(',',$fieldsname); - $fieldsname = "concat("; - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); - $fieldsname = $fieldsname.")"; + // concatenate multiple fields with an whitespace between them + $fieldlists = explode(',',$fieldsname); + $fl = array(); + foreach($fieldlists as $w => $c) + { + if (count($fl)) + $fl[] = "' '"; + $fl[] = $c; + } + $fieldsname = $adb->sql_concat($fl); } if($current_module =='Organization') { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; } else { $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; } - $result = $adb->query($query1); - $item_summary = $adb->query_result($result,0,'entityname'); + $item_summary = $adb->run_query_field($query1); } ### Check database item sizes From jens at Strawberry.COM Fri May 11 00:36:01 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 09:36:01 +0200 Subject: [Vtigercrm-developers] [PATCH] leads module fix (postgres) In-Reply-To: <20070511013207.GB19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 03:32:07AM +0200 References: <20070511013207.GB19509@nibiru.local> Message-ID: <20070511093601.A14681@Strawberry.COM> Hi, my Postgres patches already introduced a stored procedure which handles concats in Postgres. This is IMHO mor performant. Jens On Fri, May 11, 2007 at 03:32:07AM +0200, Enrico Weigelt wrote: > > Hi folks, > > > the leads module (Tracker.php) suffers from an sql bug: it uses > mysql specific sql statements for concatenating fields. This ends > up in empty result objects and so the already mentioned error > of trying to call Move() on non-object. > > This patch solves this by using the new PearDatabas::sql_concat() > function (see prev. patch) for creating the statement. > > Also this patch calls the new PearDatabase::run_query_field() > for the one-field-query. > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > diff -ruN htdocs.orig/data/Tracker.php htdocs/data/Tracker.php > --- htdocs.orig/data/Tracker.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/data/Tracker.php 2007-05-11 03:11:37.000000000 +0200 > @@ -80,18 +80,23 @@ > $entityidfield = $adb->query_result($result,0,'entityidfield'); > if(!(strpos($fieldsname,',') === false)) > { > - $fieldlists = explode(',',$fieldsname); > - $fieldsname = "concat("; > - $fieldsname = $fieldsname.implode(",' ',",$fieldlists); > - $fieldsname = $fieldsname.")"; > + // concatenate multiple fields with an whitespace between them > + $fieldlists = explode(',',$fieldsname); > + $fl = array(); > + foreach($fieldlists as $w => $c) > + { > + if (count($fl)) > + $fl[] = "' '"; > + $fl[] = $c; > + } > + $fieldsname = $adb->sql_concat($fl); > } > if($current_module =='Organization') { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield='".$item_id."'"; > } else { > $query1 = "select $fieldsname as entityname from $tablename where $entityidfield=" .$item_id; > } > - $result = $adb->query($query1); > - $item_summary = $adb->query_result($result,0,'entityname'); > + $item_summary = $adb->run_query_field($query1); > } > > ### Check database item sizes > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From philip at vtiger.com Fri May 11 03:29:36 2007 From: philip at vtiger.com (Philip) Date: Fri, 11 May 2007 15:59:36 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511001335.GA5640@nibiru.local> References: <20070511001335.GA5640@nibiru.local> Message-ID: <46444590.1040501@vtiger.com> Hi Enrico, When tested the code i had the following exception thrown in the screen. *Fatal error*: Uncaught exception 'Exception' with message 'given result set is not an object' in /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 Stack trace: #0 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): PearDatabase->query_result(false, 0, 'count') #1 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): include('/home/crm-test3...') #2 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): require_once('/home/crm-test3...') #3 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): require_once('/home/crm-test3...') #4 /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): include('/home/crm-test3...') #5 {main} thrown in */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* on line *442 *So where should i catch this exception. Regards, Philip Enrico Weigelt wrote: > Hi folks, > > as we sometimes get some errors like: > > # Fatal error: Call to a member function Move() on a non-object > # in .../include/database/PearDatabase.php on line 443 > > Obviously sometimes the query_result() method is called with an > non-existing result object. > > This patch adds an check which throws an exception on missing > result object, so we can easily track it down. > > > cu > > ------------------------------------------------------------------------ > > diff -ruN htdocs.orig/include/database/PearDatabase.php htdocs/include/database/PearDatabase.php > --- htdocs.orig/include/database/PearDatabase.php 2007-05-09 00:56:24.000000000 +0200 > +++ htdocs/include/database/PearDatabase.php 2007-05-11 01:51:08.000000000 +0200 > @@ -438,6 +438,8 @@ > function query_result(&$result, $row, $col=0) > { > //$this->println("ADODB query_result r=".$row." c=".$col); > + if (!is_object($result)) > + throw new Exception("result is not an object"); > $result->Move($row); > $rowdata = $this->change_key_case($result->FetchRow()); > //$this->println($rowdata); > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com From weigelt at metux.de Fri May 11 06:57:17 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 15:57:17 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <46444590.1040501@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> Message-ID: <20070511135717.GD19509@nibiru.local> * Philip schrieb: Hi, > When tested the code i had the following exception thrown in the screen. > > *Fatal error*: Uncaught exception 'Exception' with message 'given result > set is not an object' in > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 > Stack trace: #0 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): > PearDatabase->query_result(false, 0, 'count') #1 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): > include('/home/crm-test3...') #2 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): > require_once('/home/crm-test3...') #3 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): > require_once('/home/crm-test3...') #4 > /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): > include('/home/crm-test3...') #5 {main} thrown in > */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* > on line *442 Looks like an bug in Potentials/ListView.php. Probably an query failed and so $result is empty. We've lots of such issues everywhere :( cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 07:38:26 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:38:26 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers Message-ID: <20070511143826.GF19509@nibiru.local> Hi folks, is it possible (by the db schema) to change invoice numbers ? I don't like the automatic numbering very much and like to change the numbers. I suspect similar trouble as w/ the org/company name ;-O cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 07:46:44 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:46:44 +0200 Subject: [Vtigercrm-developers] Sending invoice via email Message-ID: <20070511144644.GG19509@nibiru.local> Hi folks, I'm looking for an function to send invoices automatically via eMail. Is there already such an function or should I implement it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 07:57:14 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 16:57:14 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" Message-ID: <20070511145714.GH19509@nibiru.local> Hi folks, could anyone please explain what the invoice status "credited invoice" actually means ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From jens at Strawberry.COM Fri May 11 08:03:35 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:03:35 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511143826.GF19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:38:26PM +0200 References: <20070511143826.GF19509@nibiru.local> Message-ID: <20070511170335.A16456@Strawberry.COM> Hi, originally the invoice number was just the CRMEntity ID. As it is for any other entity like quotes, so, ... But: hasn't there been a recent change on that (just invoices)? What about a generic solution to that issue, too? I was already thinking about introducing "ranges of numbers", a table that defines the format of particular numbers, like invoice-numbers, product-numbers etc. Especially for invoices we need some automatism. Some govern- ments - Germany !!! - forces companies to provide an determi- nistic numbering scheme for invoices. So this field cannot be assigned manually to each invoice. jens On Fri, May 11, 2007 at 04:38:26PM +0200, Enrico Weigelt wrote: > > Hi folks, > > > is it possible (by the db schema) to change invoice numbers ? > > I don't like the automatic numbering very much and like to change > the numbers. > > I suspect similar trouble as w/ the org/company name ;-O > > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From jens at Strawberry.COM Fri May 11 08:07:02 2007 From: jens at Strawberry.COM (Jens Hamisch) Date: Fri, 11 May 2007 17:07:02 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511145714.GH19509@nibiru.local>; from Enrico Weigelt on Fri, May 11, 2007 at 04:57:14PM +0200 References: <20070511145714.GH19509@nibiru.local> Message-ID: <20070511170702.C16456@Strawberry.COM> Eine Stundung? On Fri, May 11, 2007 at 04:57:14PM +0200, Enrico Weigelt wrote: > > Hi folks, > > could anyone please explain what the invoice status > "credited invoice" actually means ? > > cu > -- > --------------------------------------------------------------------- > Enrico Weigelt == metux IT service > > phone: +49 36207 519931 www: http://www.metux.de/ > fax: +49 36207 519932 email: contact at metux.de > cellphone: +49 174 7066481 > --------------------------------------------------------------------- > -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- > --------------------------------------------------------------------- > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -- -------------------------------------------------------------------------------- s t r a w b e r r y e d v - s y s t e m e g m b h SSSSSSSSS Am Flosskanal 7 Jens Hamisch SSSSSSSSSSSSS D-82515 Wolfratshausen Geschaeftsfuehrer/CEO SSSSS-----SSSSS ---SSSSS--------- fon (+49 8171) 41805-0 -----SSSSSSS----- fax (+49 8171) 41805-59 ---------SSSSS--- info at strawberry.com jens.hamisch at strawberry.com SSSSS-----SSSSS mobil: (+49 172) 8104162 SSSSSSSSSSSSS Geschaeftsfuehrer/CEO SSSSSSSSS Jens Hamisch a g m u e n c h e n H R B 9 3 2 8 7 - D E 1 2 9 4 6 7 5 1 8 From weigelt at metux.de Fri May 11 08:22:25 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:22:25 +0200 Subject: [Vtigercrm-developers] Changing invoice numbers In-Reply-To: <20070511170335.A16456@Strawberry.COM> References: <20070511143826.GF19509@nibiru.local> <20070511170335.A16456@Strawberry.COM> Message-ID: <20070511152225.GI19509@nibiru.local> * Jens Hamisch schrieb: Hi, > originally the invoice number was just the CRMEntity ID. > As it is for any other entity like quotes, so, ... > But: hasn't there been a recent change on that (just invoices)? Ah, I see: The invoice ID is actually an pointer for schema internal references. And that's the source of the problem: internal references should always base on internal object IDs, never on user- visible idents/names. > What about a generic solution to that issue, too? > I was already thinking about introducing "ranges of numbers", > a table that defines the format of particular numbers, like > invoice-numbers, product-numbers etc. Ugh, no. Not for the object references. For such things we have sequences, which produce OIDs (which are in fact just unique numbers). Many things which an user would call "number" are names, not numbers. So ie. for invoice numbers: they're not object ID's, but names. Of course names, which follow certain rules, ie. for automatic allocation, but from the schema's view they're just opaque names, strings, text. > Especially for invoices we need some automatism. Some govern- > ments - Germany !!! - forces companies to provide an determi- > nistic numbering scheme for invoices. So this field cannot be > assigned manually to each invoice. Leave this to the user/admin. It should be clear that the "invoice_no" field cannot be an object id. So the first step is to introduce an separate oid field (fed by some sequence) and let *all* references point on that field. From now on let's call the old invoice_no field an invoice ident. The second step is to implement an customizable scheme for autmatic invoice ident allocation. Maybe put this into an separate class, which can be easily adoped to user's needs. Whether some crm user should be allowed to change the invoice idents is just an permission issue. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From weigelt at metux.de Fri May 11 08:24:50 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 17:24:50 +0200 Subject: [Vtigercrm-developers] Translation issue: "credited invoice" In-Reply-To: <20070511170702.C16456@Strawberry.COM> References: <20070511145714.GH19509@nibiru.local> <20070511170702.C16456@Strawberry.COM> Message-ID: <20070511152450.GJ19509@nibiru.local> * Jens Hamisch schrieb: switching this thread to german: > Eine Stundung? Ok. Man kann Rechnungen nur komplett stunden ? F?r Ratenzahlung, etc haben wir noch kein Handling ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From fp at crm-now.de Fri May 11 09:27:42 2007 From: fp at crm-now.de (Frank Piepiorra) Date: Fri, 11 May 2007 18:27:42 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: Message-ID: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Enrico, any chance that you post your contribution as files at vtigerForge? Regards, Frank From weigelt at metux.de Fri May 11 11:11:59 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:11:59 +0200 Subject: [Vtigercrm-developers] TeX render API v1 In-Reply-To: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> References: <200705111627.l4BGRfDO013992@prokyon.d-hosting.de> Message-ID: <20070511181159.GA25485@nibiru.local> * Frank Piepiorra schrieb: Hi, > any chance that you post your contribution as files at vtigerForge? any chance for doing this per command line ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- From gopals at vtiger.com Fri May 11 11:34:35 2007 From: gopals at vtiger.com (Gopal) Date: Sat, 12 May 2007 00:04:35 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511135717.GD19509@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> Message-ID: <4644B73B.70005@vtiger.com> Hi Enrico, Thanks for your suggestions to take vtiger to next level. Please don't hesitate to highlight issues (if any) in various places. In fact Philip has tried to integrate your patch with our 5.0.3 release. However, he is unsuccessful. It will be of great help, if you could spend your valuable time on our forthcoming 5.0.3 release. I am confident, with our community support we can release a better product. Best Regards, Gopal (vtiger Team) Enrico Weigelt wrote: > * Philip schrieb: > > Hi, > > >> When tested the code i had the following exception thrown in the screen. >> >> *Fatal error*: Uncaught exception 'Exception' with message 'given result >> set is not an object' in >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php:442 >> Stack trace: #0 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/ListView.php(183): >> PearDatabase->query_result(false, 0, 'count') #1 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/index.php(29): >> include('/home/crm-test3...') #2 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/Ajax/CommonAjax.php(12): >> require_once('/home/crm-test3...') #3 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/modules/Potentials/PotentialsAjax.php(11): >> require_once('/home/crm-test3...') #4 >> /home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/index.php(582): >> include('/home/crm-test3...') #5 {main} thrown in >> */home/crm-test3/donot_delete/vtigerCRM5/apache/htdocs/vtigerCRM/include/database/PearDatabase.php* >> on line *442 >> > > Looks like an bug in Potentials/ListView.php. > Probably an query failed and so $result is empty. > > We've lots of such issues everywhere :( > > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070512/b5575516/attachment-0003.html From weigelt at metux.de Fri May 11 11:55:11 2007 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 11 May 2007 20:55:11 +0200 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <4644B73B.70005@vtiger.com> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> Message-ID: <20070511185511.GB25485@nibiru.local> * Gopal schrieb: Hi, > In fact Philip has tried to integrate your patch with our 5.0.3 > release. However, he is unsuccessful. It will be of great help, if you > could spend your valuable time on our forthcoming 5.0.3 release. I'm entirely working on Jens's 5.1 branch, since I need postgres. IMHO we first should get 5.0.3 and 5.1_jens merged. My patches are divided into two groups: *jens*.diff -> the changes from 5.1_jens to jens' personal tree *nekrad*.diff -> my own changes based on jens' tree. Maybe, in some cases the ordering could be significant (although it *should* not ;-O) Some of my patches *might* also work on 5.0.3, but I didn't check. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact at metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- From philip at vtiger.com Sun May 13 23:20:29 2007 From: philip at vtiger.com (Philip) Date: Mon, 14 May 2007 11:50:29 +0530 Subject: [Vtigercrm-developers] [PATCH] PearDatabase.php sanity check in Move() In-Reply-To: <20070511185511.GB25485@nibiru.local> References: <20070511001335.GA5640@nibiru.local> <46444590.1040501@vtiger.com> <20070511135717.GD19509@nibiru.local> <4644B73B.70005@vtiger.com> <20070511185511.GB25485@nibiru.local> Message-ID: <4647FFAD.3020804@vtiger.com> Hi Enrico, Regarding the patch, to overcome the empty result error you have given the throw exception, function but whenever we use throw exception, we need to use catch function, because of this i got uncaught exception during the patch integration. Does the patch works fine with out caught function in your setup? if not where do we need to include this catch function? Any help would be highly appreciated. Regards, Philip Enrico Weigelt wrote: > * Gopal schrieb: > > Hi, > > >> In fact Philip has tried to integrate your patch with our 5.0.3 >> release. However, he is unsuccessful. It will be of great help, if you >> could spend your valuable time on our forthcoming 5.0.3 release. >> > > I'm entirely working on Jens's 5.1 branch, since I need postgres. > IMHO we first should get 5.0.3 and 5.1_jens merged. > > My patches are divided into two groups: > > *jens*.diff -> the changes from 5.1_jens to jens' personal tree > *nekrad*.diff -> my own changes based on jens' tree. > > Maybe, in some cases the ordering could be significant > (although it *should* not ;-O) > > > Some of my patches *might* also work on 5.0.3, but I didn't check. > > > cu > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070514/4c27c9ee/attachment-0005.html From anugupta at pu.ac.in Mon May 14 01:59:42 2007 From: anugupta at pu.ac.in (Anu Gupta DCSA) Date: Mon, 14 May 2007 15:29:42 +0630 Subject: [Vtigercrm-developers] A Survey on Defect Management Practices in Free/Open Source Software Message-ID: <20070514085932.M82540@pu.ac.in> Sir/Madam I seek help from designers, developers, testers,defect fixers,project managers or playing any other key role in Free/Open Source software development or maintenence in carrying out a study on practices and problems of defect management in various Free/Open Source Software projects. The insights gained from the study can further help us to extract publicly accessible defect data and determine impact of defect management practices on software quality. Please spend a few minutes of your precious time to fill up the Questionnaire. The most of the questions follow multiple choice formats and are quite easy to answer. To have the Online Questionnaire, please visit: http://anu.puchd.ac.in/phpESP/public/survey.php?name=FOSS_Defect_Survey (You can also copy and paste this link into your browser, and hit the 'Return' key.) I hope you will find all the questions interesting and thought-provoking. Your answers will be kept anonymous.The data thus collected will only be used for research purpose.It would be nice if you may further refer this mail to others actively engaged with Free/Open Source Software development. If you have any query or suggestions then feel free to contact. Thank You With regards, Anu Gupta Senior Lecturer Department of Computer Science and Applications, Panjab University, Chandigarh. INDIA In case of any problem in accessing/using the above mentioned link please contact: E-mail: anugupta at pu.ac.in anugupta98 at gmail.com From joe at tsolucio.com Tue May 15 16:56:04 2007 From: joe at tsolucio.com (Joe Bordes) Date: Wed, 16 May 2007 01:56:04 +0200 Subject: [Vtigercrm-developers] Custom Invoice Number Message-ID: <464A4894.1060001@tsolucio.com> Hi, I have just looked at this code. I believe that this is not the correct way to solve the autoincrement problem Perfectioning the code that already exists in forum/wiki for this you would have had a more complete solution that would serve any module. Instead you have whipped up your own solution which is probably not multi-user safe, you have hardcoded english text into a checkduplicate function which would not be necessary if you were using the database which is already transaction and multiuser safe and you are writing php files with code each time an invoice is made. Have you at all thought about 4-5 people making invoices at a time? Why are you still hardcoding strings in the code? Why not trust the database to avoid overlapping? I mean the database guys have solved this problem a long time ago, who are we to invent a new untested system? As normal you leave aside the community. I know I am becomming a persona non grata here, but somebody has to say these things. If you keep in this line this product is doomed. Joe TSolucio From davidv.net at gmail.com Wed May 16 06:09:47 2007 From: davidv.net at gmail.com (David V.) Date: Wed, 16 May 2007 09:09:47 -0400 Subject: [Vtigercrm-developers] Custom Invoice Number In-Reply-To: <464A4894.1060001@tsolucio.com> References: <464A4894.1060001@tsolucio.com> Message-ID: Joe, You are beeing a bit hard here but thank you for reporting this. I'm also waiting for a better solution for invoices number but I have to admit I did not spend the necessary time to look at the new code in 5.0.3. Thank you. David V. 2007/5/15, Joe Bordes : > Hi, > > I have just looked at this code. > I believe that this is not the correct way to solve the autoincrement > problem > Perfectioning the code that already exists in forum/wiki for this you > would have had a more complete solution that would serve any module. > Instead you have whipped up your own solution which is probably not > multi-user safe, you have hardcoded english text into a checkduplicate > function which would not be necessary if you were using the database > which is already transaction and multiuser safe and you are writing php > files with code each time an invoice is made. > Have you at all thought about 4-5 people making invoices at a time? > Why are you still hardcoding strings in the code? > Why not trust the database to avoid overlapping? I mean the database > guys have solved this problem a long time ago, who are we to invent a > new untested system? > > As normal you leave aside the community. > > I know I am becomming a persona non grata here, but somebody has to say > these things. If you keep in this line this product is doomed. > > Joe > TSolucio > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > From chazarra.clement at gmail.com Mon May 21 06:20:04 2007 From: chazarra.clement at gmail.com (clement chazarra) Date: Mon, 21 May 2007 14:20:04 +0100 Subject: [Vtigercrm-developers] Security focus Message-ID: Hello everybody, I just wanted to point out a little document from drupal community highlighting secure ways to code. http://drupal.org/writing-secure-code My suggestion would even be to add in the wiki a "Security focus" page where we could add the different techniques developers should follow to produce secure code. If at some points the list seems quite complete and up to date, it might be a good idea to schedule a release dedicated on that matter and upgrade the whole code. Other pages in the wiki could be created as well, focusing on different important matters like performance/usability/etc. Byebye Clem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070521/b4c9e07d/attachment-0003.html From joe at tsolucio.com Mon May 28 08:40:07 2007 From: joe at tsolucio.com (Joe Bordes) Date: Mon, 28 May 2007 17:40:07 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 Message-ID: <1180366807.23252.14.camel@joesunix.int> Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio From aissa at abonlinesolutions.com Mon May 28 08:42:41 2007 From: aissa at abonlinesolutions.com (=?iso-8859-1?B?Qe9zc2E=?=) Date: Mon, 28 May 2007 17:42:41 +0200 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <1180366807.23252.14.camel@joesunix.int> References: <1180366807.23252.14.camel@joesunix.int> Message-ID: <000001c7a13e$d4db3ad0$7e91b070$@com> Idem here, it's bizarre. A?ssa ABOnline solutions -----Message d'origine----- De?: Joe Bordes [mailto:joe at tsolucio.com] Envoy??: lundi 28 mai 2007 17:40 ??: vtigercrm-developers at lists.vtigercrm.com Objet?: [Vtigercrm-developers] svn trunk in branches/5.0.3 Hi, I just "updated" my svn version and recieved a new "trunk" directory containing the whole application???? Joe TSolucio _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com From richie at vtiger.com Mon May 28 14:26:08 2007 From: richie at vtiger.com (richie) Date: Tue, 29 May 2007 02:56:08 +0530 Subject: [Vtigercrm-developers] svn trunk in branches/5.0.3 In-Reply-To: <000001c7a13e$d4db3ad0$7e91b070$@com> References: <1180366807.23252.14.camel@joesunix.int> <000001c7a13e$d4db3ad0$7e91b070$@com> Message-ID: <465B48F0.1020908@vtiger.com> Yes. Michel jaquemes had checked in the entire application as a separate folder. I have removed it. Pl. try now. Michel: I have revoked your permission to do mischief for now ;-) *Richie* A?ssa wrote: > Idem here, it's bizarre. > A?ssa > ABOnline solutions > > -----Message d'origine----- > De : Joe Bordes [mailto:joe at tsolucio.com] > Envoy? : lundi 28 mai 2007 17:40 > ? : vtigercrm-developers at lists.vtigercrm.com > Objet : [Vtigercrm-developers] svn trunk in branches/5.0.3 > > Hi, > > I just "updated" my svn version and recieved a new "trunk" directory > containing the whole application???? > > Joe > TSolucio > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/cbcb280f/attachment-0003.html From brian at pr2k.com Tue May 29 19:34:18 2007 From: brian at pr2k.com (Brian Laughlin) Date: Tue, 29 May 2007 19:34:18 -0700 Subject: [Vtigercrm-developers] Patch for decoupling Accounts from Potential Message-ID: <27CABE0A5EFD714EA5B2F9B47EE5CB85EDD693@svawmc1.awnow.local> We have a simple way of accomplishing this. Would love to see this or something like it roled into the main branch after 5.0.3 is released. http://forums.vtiger.com/viewtopic.php?p=47584#47584 Regards, Brian Laughlin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070529/3b8f7b0a/attachment-0004.html From gopals at vtiger.com Thu May 31 05:41:42 2007 From: gopals at vtiger.com (Gopal) Date: Thu, 31 May 2007 18:11:42 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <465EC286.9060507@vtiger.com> Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal From richie at vtiger.com Thu May 31 06:12:34 2007 From: richie at vtiger.com (richie) Date: Thu, 31 May 2007 18:42:34 +0530 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC286.9060507@vtiger.com> References: <465EC286.9060507@vtiger.com> Message-ID: <465EC9C2.8040301@vtiger.com> Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 Thank you all for your patience and faith, *Richie* Gopal wrote: > Dear Team, > > I am happy to inform you all that we have successfully completed all our > routine tests. We are expecting release in another few hours time. > > Thanks & Regards, > Gopal > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/74578fc5/attachment-0004.html From brett.hooker at roarz.com Thu May 31 06:48:38 2007 From: brett.hooker at roarz.com (Brett Hooker) Date: Thu, 31 May 2007 23:48:38 +1000 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... In-Reply-To: <465EC9C2.8040301@vtiger.com> References: <465EC286.9060507@vtiger.com> <465EC9C2.8040301@vtiger.com> Message-ID: <465ED236.30205@roarz.com> Definition of popularity? Bringing SourceForge down when you release a product: richie wrote: > Dear Team, > > vtigercrm-5.0.3 is officially released. > You can have a look at the files at > http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=233479 > > Thank you all for your patience and faith, > *Richie* > > Gopal wrote: >> Dear Team, >> >> I am happy to inform you all that we have successfully completed all our >> routine tests. We are expecting release in another few hours time. >> >> Thanks & Regards, >> Gopal >> _______________________________________________ >> Reach hundreds of potential candidates - http://jobs.vtiger.com >> >> > > ------------------------------------------------------------------------ > > _______________________________________________ > Reach hundreds of potential candidates - http://jobs.vtiger.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0005.html -------------- next part -------------- A non-text attachment was scrubbed... Name: vt503dl-error.png Type: image/png Size: 52074 bytes Desc: not available Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/e6b081eb/attachment-0003.png From rvpromociones at yahoo.es Thu May 31 16:00:58 2007 From: rvpromociones at yahoo.es (Yosu Cadilla) Date: Thu, 31 May 2007 23:00:58 +0000 (GMT) Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: <20070531230058.75110.qmail@web28008.mail.ukl.yahoo.com> Indeed! Saludos, Yosu Cadilla. ____________________________________________________________________________________ ?Descubre una nueva forma de obtener respuestas a tus preguntas! Entra en Yahoo! Respuestas. http://es.answers.yahoo.com/info/welcome -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20070531/14773489/attachment-0004.html From Andreas.Reiche at LGN.Niedersachsen.de Thu May 31 23:18:16 2007 From: Andreas.Reiche at LGN.Niedersachsen.de (Reiche, Andreas) Date: Fri, 1 Jun 2007 08:18:16 +0200 Subject: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Message-ID: Hi Team, thanks for your great work! A few question regarding SVN: Will this release be tagged in SVN? Is it based on Changeset 11172? Where will the ongoing developement be taken (5.0.3 Branch or another one or new trunk)? I ask because i would prefer to check out from SVN for testing and developing environement. regards, Andreas Reiche, Von: vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:vtigercrm-developers-bounces at lists.vtigercrm.com] Im Auftrag von richie Gesendet: Donnerstag, 31. Mai 2007 15:13 An: vtigercrm-developers at lists.vtigercrm.com Betreff: Re: [Vtigercrm-developers] vtiger 5.0.3 - Will be availble in few hours... Dear Team, vtigercrm-5.0.3 is officially released. You can have a look at the files at http://sourceforge.net/project/showfiles.php?group_id=117522&package_id=2334 79 Thank you all for your patience and faith, Richie Gopal wrote: Dear Team, I am happy to inform you all that we have successfully completed all our routine tests. We are expecting release in another few hours time. Thanks & Regards, Gopal _______________________________________________ Reach hundreds of potential candidates - http://jobs.vtiger.com