stephanepa38 Posted June 19, 2009 Author Report Share Posted June 19, 2009 Ok thanks, I dowload the latest phpvms.beta.zip file and I will install it. Thanks for your help ! Stéphane Quote Link to comment Share on other sites More sharing options...
stephanepa38 Posted June 19, 2009 Author Report Share Posted June 19, 2009 Hello I've done the update. Now, when I go to the test.php file, it shows me 0.45 !!! In the finances, for 1000 kg of fuel, the price is -500 euros. The real price is -450 euros, but I think phpVMS rounds the price, doesn't it ? Thanks for all. Stéphane Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 Yeah, I found some rounding issues when I typecast, that's probably the issue. I'll find and fix those. Thanks! Quote Link to comment Share on other sites More sharing options...
stephanepa38 Posted June 19, 2009 Author Report Share Posted June 19, 2009 I calculate the fuel price. The price is 0.5 euros / kg but in test.php it is 0.45 (also good). So 0.5 can be the rounded number of 0.45 The rounded price is not really a big problem for me, but it will be great if you can fix it. Thanks ! Stéphane Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 Interesting, I will check it out. The rounding would be to a whole number (.45 would round to 0). Quote Link to comment Share on other sites More sharing options...
stephanepa38 Posted June 19, 2009 Author Report Share Posted June 19, 2009 a whole number (.45 would round to 0). I think it is very interesting to round the fuel price to a whole number. I have done some tests. I set up the fuel price to 1.00 euro / kg. I filed a manual pirep and the fuel costs are - 1050 euros for 1000 kg of fuel (so fuel price is 1.05 euros / kg). In the test.php file, the fuel price is correct. Thanks Stéphane Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 In the unit_test.php file, just add: echo FinanceData::GetFuelPrice(1000, 'LFPG'); I think you're using LFPG. See what that says. OH! I just realized why - it adds a 'surcharge' to the fuel price (for taxes, costs). This is the FUEL_SURCHARGE option (it's default is 5, which is 5%). You can set that to 0 if you'd like, but 5% is the default (some 'extra' realism) Quote Link to comment Share on other sites More sharing options...
stephanepa38 Posted June 19, 2009 Author Report Share Posted June 19, 2009 Hello The result is 1050. For information, I deleted the line about the fuel surcharge, so i don't think the problem comes from the fuel surcharge. I will add this line with "0". I will post the result. Thanks Stéphane EDIT : If you delete the line about the fuel surcharge in the local config file, it takes the default value : 5. If you put this line and set the value to 0, it works very good. Now, all is OK. Thanks for your help ! Stéphane Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 19, 2009 Administrators Report Share Posted June 19, 2009 Yeah, the default value in app.config.php is 5, but when you put the setting in local.config.php, it will take that value instead 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.