phpvms icon indicating copy to clipboard operation
phpvms copied to clipboard

Incorrect text on ADD New AIRPORT

Open lesmar54 opened this issue 2 years ago • 4 comments

Describe the bug This is a minor cosmetic bug that has occurred when using the ADD NEW AIRPORT module in that the FUEL cost inputs are referred to as a cost for lbs. The error is that on the virtual airline configuration I set units to kgs and litres and as such I would have expected the display to show the same

Version 7.0.0-dev+220328.e2226b

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Admin '
  2. Click on 'settings '
  3. Scroll down to 'Fuel Units'
  4. Set Fuel Units to kgs. 5 Click on 'airports' 6 Click on 'Add New ' see the error Expected behavior I would expect the text on the screen regarding fuel cost to reflect what the virtual airline has selected in the settings

Screenshots Screen Shot added

Additional context Screenshot 2022-06-11 at 18 13 36

lesmar54 avatar Jun 11 '22 14:06 lesmar54

This should be an easy fix where the setting configuration is used to format the text for the fuel cost

lesmar54 avatar Jun 11 '22 14:06 lesmar54

I do not think that this is a bug or typo... Database (or say core) unit types are fixed, so as far as I know that field is also fixed to lbs ('cause the core fuel unit is fixed to lbs/pounds)

Units you select at admin settings are for visual display, for the frontend in other words. So no matter what you select at settings, core unit requirements and core units will not change.

Hope this explanation helps

FatihKoz avatar Jun 11 '22 16:06 FatihKoz

Thank you for the reply So if you set the fuel units to kg then any calculation and display should use the 1kg = 2.2 lbs to be correct

If you input a price for fuel of say 1.00 € per lb you would expect any fuel display to show as such 2.20€ or will it still say 1.00€

Hopefully you can answer this with your expert knowledge of V7

On 11 Jun 2022, at 20:42, B.Fatih KOZ @.***> wrote:

I do not think that this is a bug or typo... Database (or say core) unit types are fixed, so as far as I know that field is also fixed to lbs ('cause the core fuel unit is fixed to lbs/pounds)

Units you select at admin settings are for visual display, for the frontend in other words. So no matter what you select at settings, core unit requirements and core units will not change.

Hope this explanation helps

— Reply to this email directly, view it on GitHub https://github.com/nabeelio/phpvms/issues/1460#issuecomment-1152961706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ7CEF5YRJPY3OQNS7J2NDVOS6XZANCNFSM5YQFGOIQ. You are receiving this because you authored the thread.

lesmar54 avatar Jun 11 '22 16:06 lesmar54

All calculations made by the core will use LBS (regarding fuel and weight), no matter what you select in settings.

The displayed results however, if needed, can be converted to your local units.

I think it is more clear now.

Some examples for you, from a completed pirep of a live site;

image

image

image

image

Edit: Changed to Airport Details image (it had a conversion error)

FatihKoz avatar Jun 11 '22 17:06 FatihKoz