From: ExsonQu <hex...@gm...> - 2014-04-06 03:35:14
|
*Dear all,* Thank you very much for your great work to webERP community. I've detected a problem in Prices.php when it runs in mysql strict mode. It will be error for $SQLEndDate='0000-00-00'. Shall we change this to '9999-12-31' to coincide with mysql's definition. Otherwise, users use this strict mode we have to face the problem when they do not set the effective end date. Any comments are highly appreciated! Thanks and best regards! Exson -- View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Shall-we-change-the-SQL-end-date-to-9999-12-31-tp4657341.html Sent from the web-ERP-developers mailing list archive at Nabble.com. |
From: Pak R. <pak...@gm...> - 2014-04-07 01:09:04
|
Hi Exson: I brought it up long time ago as it would help to simplify all queries regarding prices, as we do not need to add the OR enddate = '0000-00-00' condition everywhere to detect the current active price. That was my main goal then, as keeping it as 0000-00-00 was messing with the Joomla! extension I used back then. Really can't remember the reason why it was decided to keep it as is (probably a tech reason beyond my understanding), so I can't help much. As usual, if you decide to go ahead with this change, will be happy to test i! Regards, Ricard 2014-04-06 15:55 GMT+08:00 Tim Schofield <tim...@gm...>: > Hi Exson, > > I remember Ricard brought this up a few years ago but Phil wanted to > stay using the 0000-00-00 dates at the time. > > Thanks > Tim > > On 6 April 2014 04:34, ExsonQu <hex...@gm...> wrote: > > *Dear all,* > > > > Thank you very much for your great work to webERP community. > > > > I've detected a problem in Prices.php when it runs in mysql > strict > > mode. It will be error for $SQLEndDate='0000-00-00'. > > > > Shall we change this to '9999-12-31' to coincide with mysql's > > definition. Otherwise, users use this strict mode we have to face the > > problem when they do not set the effective end date. > > > > Any comments are highly appreciated! > > > > Thanks and best regards! > > > > Exson > > > > > > > > -- > > View this message in context: > http://weberp-accounting.1478800.n4.nabble.com/Shall-we-change-the-SQL-end-date-to-9999-12-31-tp4657341.html > > Sent from the web-ERP-developers mailing list archive at Nabble.com. > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Web-erp-developers mailing list > > Web...@li... > > https://lists.sourceforge.net/lists/listinfo/web-erp-developers > > > > -- > Course View Towers, > Plot 21 Yusuf Lule Road, > Kampala > T +256 (0) 312 314 418 > M +256 (0) 752 963 325 > www.weberpafrica.com > Twitter: @TimSchofield2 > Blog: http://weberpafrica.blogspot.co.uk/ > |
From: Phil D. <ph...@lo...> - 2014-04-07 01:45:31
|
Well i think the reason was pragmatic in that i didn't want to do it. We use 0000-00-00 quite a bit, in principle it makes sense to default to 9999-12-31 -- Phil Daintree +64(0)275 567890 Skype: daintree On April 7, 2014 1:08:15 PM NZST, Pak Ricard <pak...@gm...> wrote: >Hi Exson: > >I brought it up long time ago as it would help to simplify all queries >regarding prices, as we do not need to add the OR enddate = >'0000-00-00' >condition everywhere to detect the current active price. That was my >main >goal then, as keeping it as 0000-00-00 was messing with the Joomla! >extension I used back then. > >Really can't remember the reason why it was decided to keep it as is >(probably a tech reason beyond my understanding), so I can't help much. > >As usual, if you decide to go ahead with this change, will be happy to >test >i! > >Regards, >Ricard > > >2014-04-06 15:55 GMT+08:00 Tim Schofield <tim...@gm...>: > >> Hi Exson, >> >> I remember Ricard brought this up a few years ago but Phil wanted to >> stay using the 0000-00-00 dates at the time. >> >> Thanks >> Tim >> >> On 6 April 2014 04:34, ExsonQu <hex...@gm...> wrote: >> > *Dear all,* >> > >> > Thank you very much for your great work to webERP >community. >> > >> > I've detected a problem in Prices.php when it runs in >mysql >> strict >> > mode. It will be error for $SQLEndDate='0000-00-00'. >> > >> > Shall we change this to '9999-12-31' to coincide with >mysql's >> > definition. Otherwise, users use this strict mode we have to face >the >> > problem when they do not set the effective end date. >> > >> > Any comments are highly appreciated! >> > >> > Thanks and best regards! >> > >> > Exson >> > >> > >> > >> > -- >> > View this message in context: >> >http://weberp-accounting.1478800.n4.nabble.com/Shall-we-change-the-SQL-end-date-to-9999-12-31-tp4657341.html >> > Sent from the web-ERP-developers mailing list archive at >Nabble.com. >> > >> > >> >------------------------------------------------------------------------------ >> > _______________________________________________ >> > Web-erp-developers mailing list >> > Web...@li... >> > https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> >> -- >> Course View Towers, >> Plot 21 Yusuf Lule Road, >> Kampala >> T +256 (0) 312 314 418 >> M +256 (0) 752 963 325 >> www.weberpafrica.com >> Twitter: @TimSchofield2 >> Blog: http://weberpafrica.blogspot.co.uk/ >> > > >------------------------------------------------------------------------ > >------------------------------------------------------------------------------ >Put Bad Developers to Shame >Dominate Development with Jenkins Continuous Integration >Continuously Automate Build, Test & Deployment >Start a new project now. Try Jenkins in the cloud. >http://p.sf.net/sfu/13600_Cloudbees_APR > >------------------------------------------------------------------------ > >_______________________________________________ >Web-erp-developers mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: ExsonQu <hex...@gm...> - 2014-04-07 04:52:20
|
*Hi, Richard and Phil* Thank you for your nice comments. I've did a quick study of this problem. Currently, the scripts failed strict mode is Prices_Customer.php. I'll fix it immediately to use a '0000-00-00' as end date instead of ''; I did a summary for this issue: 1. In sql table, the default enddate is '9999-12-31'. It's right. 2. Prices.php and Prices_Customer.php used to define prices. The default date is set to '0000-00-00' in Prices.php which acceptable by mysql strict mode. But in Price_Customer.php, the default date is set to '', which was denied by the strict mode. 3. All prices are retrieved from GetPrice.inc. It will loop all those prices with specific end date, if no data retrieved, it'll test the end date is '0000-00-00'. 4. Files use function GetPrice() as following: SelectOrderItems_IntoCart.inc SelectCreditItems.php StockDispatch.php According to the GetPrice() defintion, even we change default end date to '9999-12-31', it will not affect any calculation result in my opinion. I think change to '9999-12-31' is NO harmful in this case. What we need to do is change the default end date variable to '9999-12-31'. sql definition will check if there is duplicated records. And it can be retrieved successfully in GetPrice.inc. Maybe I've overlooked something. Please correct if I'm wrong. Thanks and best regards! Exson -- View this message in context: http://weberp-accounting.1478800.n4.nabble.com/Shall-we-change-the-SQL-end-date-to-9999-12-31-tp4657341p4657344.html Sent from the web-ERP-developers mailing list archive at Nabble.com. |