JHAir Posted May 6, 2009 Report Share Posted May 6, 2009 Hello Again, let me put it that way Since 2008 we had two AC, each 50000 per month - that means 100000 totally Now (in May) we bought a third one and added another 50000 per month - that means 150000 totally The problem is that effects all previous months too. Is there some kind a mistake in the phpVMS system or what is the problem? EDIT: Maybe there is something wrong with my database (phpvms_financedata) It starts like: Id 1 2 2009 :a:7:{s:5:"total";d:-88569;s:13:"totalexpenses";i:1... l-88569 and ends like: (month number doesnt change until then) Id 84 2 2009 a:7:{s:5:"total";d:-88569;s:13:"totalexpenses";i:1... -88569 Id 85 3 2009 a:7:{s:5:"total";d:-13773;s:13:"totalexpenses";i:1... -13773 Id 86 4 2009 a:7:{s:5:"total";d:153219;s:13:"totalexpenses";i:1... 153219 Quote Link to comment Share on other sites More sharing options...
Wayne Posted May 6, 2009 Report Share Posted May 6, 2009 kinda interesting i have seen that happen with my site as well.. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 6, 2009 Administrators Report Share Posted May 6, 2009 Here how it's supposed to work - In APRIL, you add an expense, for toilet paper, at 100$ It's still April, you change it, you view your report for April, it shows up as 100$ If you view March, for the FIRST TIME, it will save 100$, since that's the price when you're viewing it. Now it MAY. You haven't viewed the April report yet in May, because it's the end of April, and you're adjusting your expense. So you change the toilet paper cost to 50$, since you're forcing your passengers to use pinecones, so you add another expense for pinecones, at $25. Now, you go and view APRIL. It will save the current expenses you have So March: TP - 50$ April: TP: 50$ Pinecones: 25$ May: TP: 50$ Pinecones: 25$ Now June rolls around, you adjust again, so, TP for 100$, pinecones are 10$, and you view MAY to save May's expenses: So March: TP - 50$ April: TP: 50$ Pinecones: 25$ May: TP: 100$ Pinecones: 10$ Etc, etc, so-on and so forth. It's funky because PHP isn't perpetual, I can't keep a running tally unless I make some other changes which I'm contemplating on making. So it seems like there's a bug with it picking up the expense per month. I'll check that out, since the financedata table looks like it's saving the correct data. Thanks Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 6, 2009 Administrators Report Share Posted May 6, 2009 Found a weird mistake. In core/common/financedata.class.php, line 127 is commented out. That shouldn't be. If you uncomment it (remove the //), does it show up proper? So change: //$report = self::GetCachedFinanceData($monthstamp); To: $report = self::GetCachedFinanceData($monthstamp); Quote Link to comment Share on other sites More sharing options...
JHAir Posted May 7, 2009 Author Report Share Posted May 7, 2009 Yeah, it seems to work, thank you! Heigo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.