Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

  • Administrators
Posted

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)

Posted

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

  • Administrators
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...