Jump to content

ProAvia

Administrators
  • Posts

    1648
  • Joined

  • Last visited

  • Days Won

    72

Posts posted by ProAvia

  1. On ‎1‎/‎25‎/‎2017 at 3:51 PM, web541 said:

    I don't think my admin skin will have any difference as I've just installed it, connected it to the same DB and it seems to output the same results each time (both in the details tab and on the edit page) and if I do remember, I only copied the information from the default templates and skinned them, so there shouldn't be any difference. Also, did you run my "Recalculate Revenue" script on the test site by ay chance?

    Found it.... Look in admin/templates/pirep_edit.php, line 151. It's calling revenue instead of gross - so that explains the DETAILS vs. EDIT in Admin Panel. BTW - love the admin skin!!

    No, I haven't run "Recalculate Revenue" yet. I stopped after doing the initial edit and saw the pilotpay not being deducted from revenue. Thought it best to not confuse myself further by adding the script to the mix.

    On ‎1‎/‎25‎/‎2017 at 3:51 PM, web541 said:

    After you made the edit, it changed an old PIREP's revenue, this seems odd (unless the function is being called, though I believe it is stored in the DB, could be wrong though) but it still added the wrong amount (as stated in your above posts, 130.2) to the revenue.

    No - I viewed an old accepted PIREP to see if anything changed. Then clicked EDIT, didn't change anything, then SUBMIT. I think it ran it through the recalculate section and added back the 130.20 pilotpay(flighttime). 

     

    On ‎1‎/‎25‎/‎2017 at 3:51 PM, web541 said:

    After edit - process existing new (pre-edit) PIREP (via kACARS)

    This one has corrected the revenue, but it doesn't subtract the pilot pay (or it goes into a negative?)

    This was a PIREP that was submitted before the edit, but processed/accepted after the edit.

    1. Before accepting pirep
      1. admin & viewreport - revenue = -19164.50 / fuel = 18923.90 --- diff of -240.60, which is pilotpay(flighttime) --- 4.01 * 60
    2. After accepting pirep
      1. admin DETAILS - revenue = 16777.30 / fuel = 26504# used / gross = 34800.00
      2. admin EDIT - revenue = 16777.30 / fuel = 18022.70 / gross = 16777.30 --- see note about admin skin above
      3. viewreport - revenue = 16777.30 / fuel = 18022.70 / gross = 34800.00
      4. gross - fuel = revenue --- doesn't subtract pilotpay at all
      5. in ledger table - amount = 241.00 --- this is pilotpay(flighttime_stamp)
    On ‎1‎/‎25‎/‎2017 at 3:51 PM, web541 said:

    After edit - process new submitted (post-edit) PIREP (manual - submitted with exact same PIREP info as pre-edit above)

    The one has corrected the revenue, but for some reason the fuel cost is a bit off in the admin panel (edit page or details tab), but it's right in the main site's view report? <= Before Processing

    After Processing though, the fuel price has fixed itself, but the gross has suddenly dropped just under half for that PIREP and only in the edit section?

    This was a new manual PIREP - submitted and processed/accepted after the edit using same data as PIREP above (flight time, load, fuelused, fuelprice, price, pilotpay/hr)

    1. Before accepting pirep
      1. admin - revenue = -18923.90 / fuel = 18923.90 --- fuel equals revenue, no pilotpay at all (but fuel price is incorrect for 0.68/# * 26504#)
      2. viewreport - revenue = -18923.90 / fuel = 18022.70 --- fuel price is correct, no idea where the 901.20 diff comes from
    2. After accepting pirep
      1. admin DETAILS - revenue = 16777.30 / fuel = 26504# used / gross = 34800.00
      2. admin EDIT - revenue = 16777.30 / fuel = 18022.70 / gross = 16777.30 --- fuel correct --- see note about admin skin above
      3. viewreport - revenue = 16777.30 / fuel = 18022.70 / gross = 34800.00 --- fuel correct
      4. gross - fuel = revenue --- doesn't subtract pilotpay at all (difference in #2 and #3 gross is admin skin)
      5. in ledger table - amount = 241.00 --- this is pilotpay(flighttime_stamp)
    On ‎1‎/‎25‎/‎2017 at 3:51 PM, web541 said:

    Can I get you to check the following

    1. In the PIREPS table in your DB, can you find the two PIREP's which you've submitted and post the following values for each
      1. load
      2. fuel used
      3. fuelunitcost
      4. fuelprice
      5. price
      6. gross
      7. expenses
      8. revenue

    That should verify which data is correct. Also, I've pushed some changes to the PayChecker to allow you to view the correct revenue for each PIREP, or at least from the values in the DB.

    1. 174 - 174
    2. 26504 - 26504
    3. 0.68 - 0.68
    4. 18022.7 - 18022.7
    5. 200 - 200
    6. 34800 - 34800
    7. 0 - 0
    8. 16777.3 - 16777.3

    So both pireps show the same - whether submitted before or after the edit. Both were processed/accepted after the edit. Does the single decimal place have to do with table Structure being 'float' and that item having a trailing zero? And why the differences in revenue & fuelprice in various areas?

    My mind is a blur after trying not to screw up these numbers and this post.:wacko: Taking a dinner break. Back in a while.

    1. Are you adding the charters using the 'Create a New Charter' button in Charter Center, or are you adding them to the database another way?
    2. Is the main airline name the same for the Charter Center? In other words, is the 'code' the same?
    3. Go to the Admin Panel, under 'Airline Operations', 'Flight Schedules & Routes', find one of your added charter flights and click the EDIT button. Look under 'Fight Type' - does it say Passenger Flight, Cargo Flight or Charter Flight? It should say Charter Flight - as this placed the letter 'H' in the 'flighttype' field of the database.
  2. Only differences between live site and test site is I'm using your admin skin on the test site - default on live site. The test DB is an exact copy of the live DB.

    After edit - no new PIREP

    1. View PIREP in original example - no change, as expected
    2. Edit PIREP in Admin Panel - didn't change anything, but submitted again.
    3. Revenue changed from 22,400.20 (pre-edit) to 22530.40 (post-edit). This seems to have added the 130.20 from pilotpay(flighttime) back in - but not subtracted pilotpay(flighttimestamp).

    After edit - process existing new (pre-edit) PIREP (via kACARS)

    1. Before processing (in admin and viewreport) - revenue of -19,164.50, fuel cost (26504#) of 18923.90 (which doesn't equal my 0.68/# fuel cost)
    2. After processing (in admin) - revenue of 16,777.28, fuel cost (26504#) of 18,022.72 (equals my 0.68/# fuel cost), gross of 34,800.00 (174 pax @ $200 each)
    3. After processing (in viewreport) - revenue of 16,777.30, others same as #2 above
    4. Subtracting gross - fuelcost = revenue. Nothing left for pilot pay

    After edit - process new submitted (post-edit) PIREP (manual - submitted with exact same PIREP info as pre-edit above)

    1. Before processing
      1. (in admin) - revenue of -18,923.90, fuel cost of 18,923.90 (which doesn't equal my 0.68/# fuel cost)
      2. (in viewreport) - revenue of -18,923.90, fuel cost of 18,022.72 (which equals my 0.68/# fuel cost)
    2. After processing (in admin)
      1. (DETAILS tab) - revenue of 16,777.30, (fuel used 26504#), gross of 34,800.00 (174 pax @ $200 each)
      2. (EDIT tab) - revenue of 16,777.30, fuel cost of 18,022.70 (26504#), gross of 16,777.30 (174 pax @ $200 each)
    3. After processing (in viewreport) - revenue 16,777.30, fuel cost of 18,022.70 (26504#), gross of 34,800.00 (174 pax @ $200 each)
    4. Subtracting gross - fuelcost = revenue in #3. Nothing left for pilot pay. Don't know what's going on with gross between #2 and #3

    The differences in the admin DETAILS versus EDIT could be the admin skin - but maybe not.

    Anyway, I'm stopping for the evening. The wife wants my attention now. Tomorrow I'll replace the admin skin with the default and see what that does (if anything).

  3. One thing I just noticed in the DB is that a submitted but not accepted PIREP shows a negative balance in revenue which looks to account for fuel cost and pilot pay (based on flighttime). This is before doing any of your edits. Hopefully your edits adjust this for flighttime_stamp when the PIREP is initially entered into the DB by kACARS.

     

  4. OK - finally have some uninterrupted time to do this. Between taking the dog to the vet and my grandson being here all day, I've had basically no time.

    Yes - I will definitely backup the DB. And I will try this on my online test site first (with a separate DB from the live site) also.

    If I understand correctly, I should:

    1. backup the DB,
    2. do the replacement in PIREPData.class.php starting at line 1042
    3. see what the results are
    4. submit a new PIREP
    5. see what the results are again
    6. then attempt your last
    7. see what happens

     

  5. phpVMS 5.5.2 requires the php version of modules. There is a way to convert the tpl versions to php, but for now you may be better off sticking with the already converted ones. Once you have a better feel and understanding of the system, you can try your hand at converting a module.

    Here's the link to the php version of the events module: https://github.com/DavidJClark/phpVMS-Event-Booking And in looking it over quickly, it appears to have the 'public static function' in the .../core/common/EventsData.class.php file (in place of the 'public static').

    After you have the php version of events module installed, I'd suggest you compare all the file of the php version to the tpl version to see the differences. This should give you an idea of how to attempt to convert other tpl module versions to php. Do this by having all files on your local computer and possibly use Notepad++ when comparing the files.

    When you receive an error like your 3rd one, go to the folder it states and look to see if you have the file mentioned. phpVMS 5.5.2 will look for the .php file extension. So if you have the file name in the correct location, look again at the file extension - most likely you have the .tpl version instead of the .php version if you already have the module installed.

     

    • Like 1
  6. 1 minute ago, treygeboy said:

    Phpvms 2 I guess the one before 3....

    And I am using php version....

     

    And public function 

    There's phpVMS 2.1.x and phpVMS 5.5.x that are publically available - Version 3 is being worked on and hasn't been released yet. Check the bottom right corner of your admin panel or admin panel, 'Site & Settings, General Settings, phpVMS Version' and let us know what exact version.

    Whether php or tpl version depends on phpVMS version.

    Have you searched the forums for 'Strict Standards' yet?

    • Like 1
  7. 2 hours ago, treygeboy said:

    Hi I am getting this error... but I have installed it just like the instruction told me...

     

    Strict Standards: Non-static method EventsData::get_upcoming_events() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/core/modules/Events/Events.php on line 16

    Strict Standards: Non-static method EventsData::get_past_events() should not be called statically, assuming $this from incompatible context in /home/xxxxxxxx/public_html/core/modules/Events/Events.php on line 17

    Notice: The template file "/home/xxxxxxxx/public_html/core/templates/events/events_index.php" doesn't exist in /home/xxxxxxxx/public_html/core/classes/TemplateSet.class.php on line 231

    What version of phpVMS are you using? Probably a good idea to list that in any post asking for assistance.

    Have you searched the forums for the 'Strict Standards' error? Lots of posts about it.

    For your first two errors (line 16 and line 17), look in core/common in the EventsData.php file. Are the items listed as 'public function' or 'public static function'?

    For your third error, that's telling you that the file 'events_index.php' is not in the ... core/templates/events/ folder. Are you using the tpl or php version of the module?

  8. 39 minutes ago, web541 said:

    I found out the issue here, if you look closely at your figures here for fuel cost (11,129.56), but in your database (from the txt file provided) the fuel cost is 11129.6 so it rounded it up before entry into the database, this one is probably to do with your acars client rounding it off as it doesn't go through phpvms I don't think.

    After the revenue change above, the pilot pay will be adjusted, so these figures are before the change above has been implemented (I'm guessing).

    Right you are! I hadn't gotten around to looking there. I'll have a go at making the changes you provided above - tomorrow. 

    Again, thank you so much for your efforts and time!

  9. 48 minutes ago, web541 said:

    Nope, it won't affect your previous entries, but I will amend my PayChecker script to change this data for you (and possibly recalculate the pilot's pay), but please back up your DB first.

    Now for your questions

    1. The way it is calculated is different (I assume this info will be placed on the view pirep page), use something like this
      
      <tr>
      	<td align="right">Pilot Pay: <br /> (per hour based on rank)<br />
      	<td align="right" valign="top">
      		<?php echo FinanceData::FormatMoney($pirep->pilotpay * $pirep->flighttime);?>
      		<?php
      		$flighttime = explode('.', $pirep->flighttime);
      		$totalminutes = ($flighttime[0] * 60) + ($flighttime[1]);
      		$pilot = PilotData::getPilotData($pirep->pilotid); // In case the pilotpay value changes in the future
      		$totalpay = ($pilot->payrate / 60) * $totalminutes;
      		return FinanceData::formatMoney($totalpay);
      		?>
      	</td>
      </tr>

       

    2. You should be able to view this in edit pirep (admin), but I'll make a table for you to show this, do you want it per pilot or per pirep?

    1. Yup, on the view pirep page.

    2. I was thinking  per pilot - showing a a column for date, flight number and pay. I can add more or incorporate into other areas once I know what to call and how to call it. Would this be available for onky the associated pilot to view, as well as admins? 

  10. Thinking about that again, I think it just slipped through the cracks. In the example I gave the data for the flight was:

    Gross Revenue: 
     (187 load / $ 180.00 per unit)
    							$ 33, 660.00 
    Fuel Cost: 
     (16367 lbs fuel used @ 0.68 / lb)
    							$ 11, 129.56 
    Net Revenue: 
     (after all expenses)
    							$ 22, 400.20 
    

    Which leave $130.24 - of which pilotpay(flighttime) was $130.20. I'll assume the 4 cents was for rounding somewhere. But the pilotpay(flighttime_stamp) was $137.00. So the revenue as reported is a higher dollar value that the actual ending dollar value giving pilotpay @ $137.00

    Jeez - I'm really glad I didn't go into accounting!

  11. 22 minutes ago, web541 said:

    I just had a thought, maybe the revenue is being counted like that on purpose?

    Quite possibly - or it just slipped through the cracks over the years. Maybe it's to adjust for the big virtual bucks the management gets paid. :lol:

    Quote

    And you should be able to see the calculation affect the revenue with the correct amount as per the ledger table.

    Will this update the revenue column in pireps for previous entries too? Hmm, I'll back up the DB before I attempt. Will have to wait until tomorrow though.

    Thanks for all your time and effort with this. I really do appreciate it! Hard to believe I started this thread asking about the flight time separator (period vs colon) and morphed to pilotpay only to find that's correct and the revenue was off.

    I do have two more questions, if I may -

    1. While I NOW know that the way I tried calling Pilot Pay below is incorrect, how do I call it? I tried substituting flighttime_stamp for flighttime, but that gave me pilotpay based on the hour and dropped the minutes. So 02:37 was computed as 2 hours.
    2. Is there a way for pilots and admins to see how much a pilot has been paid for a PIREP and a total pay somewhere? I'd like to provide a table with that data for pilots/admins to review.
    <tr>
    		<td align="right">Pilot Pay: <br />
    			(per hour based on rank)<br />
    		<td align="right" valign="top"><?php echo FinanceData::FormatMoney($pirep->pilotpay * $pirep->flighttime);?></td>
    	</tr>
    

    Thanks!!

    • Like 1
  12. I checked random ledger amounts and compared to PIREP. The pilot pay appears correct. The revenue column is all positive - except for a couple random negative entries. Not enough that it should have anything to do with the 0 issue in admin. Here's that report. I converted over in January of this year.

    Month 	Flights 	Revenue 	Pilot Pay 		Expenses 	Fuel 				Total 
    2016-10  	2  	$ 25, 300.00  	$ 0.00  		$ 0.00  	($ -9, 570.32)  	$ 15, 729.68  
    2016-11  	8  	$ 164, 100.00 	$ 0.00  		$ 0.00  	($ -40, 284.56)  	$ 123, 815.44  
    2016-12  	3  	$ 75, 300.00  	$ 0.00  		$ 0.00  	($ -20, 744.08)  	$ 54, 555.92  
    2017-01  	19  	$ 346, 750.00  	($ -123, 709.70) 	$ 0.00  	($ -125, 454.56)  	$ 97, 585.74  
     
    												Total: $ 291, 686.78 
    

    My guess is that the addition of the ledger table caused this. There's probably not a method to compute the data correctly for prior to conversion. That's why the 0 entries and negative hit on conversion. It should all balance out in the end though.

  13. 55 minutes ago, web541 said:

    Please confirm the following

    1. The issue is with the pilot pay being calculated more than expected
    2. Does this occur with just the one rank or several (with different payrates, not just $60)
    3. With your discrepancy of $6.40, the algorithm is
      1.  Supposedly doing this
        1. payrate * flighttime = dollars
          1. $60 * 2.17 = $130.20
      2. When it should be doing this
        1. payrate * total_flight_minutes = dollars
          1. $60 / 60 * 137 = $137
            1. $1 per minute in this case.
    4. In your Ledger Table, are your amount values correct?
    1. Not necessarily MORE than expected. And it may not affect actual credited pay to the pilot.
    2. All ranks with differing payrates. I used the rank @ $60/hour to make the math easier.
    3. ...
      1. Yes - but may only be using this in revenue computation
      2. Yes - this amount is shown in ledger table
    4. Yes - as per 3.2 above - $137

    PayChecker.php results

    PIREPData => CalculatePIREPPayment
    137
    
    
    PilotData => resetPilotPay
    10642.50
    
    
    New Algorithm Using Decimal Form
    137
    
    
    New Algorithm Using Flight Stamp Form
    137
    
    
    What you are getting now (I think)
    130.2
    
    

    Here's what I think is happening:

    • Net revenue is being determined using flighttime method of pilotpay. Net revenue = revenue in the pireps table.
      • Now: gross - fuelprice - expenses - pilotpay(flighttime) = revenue
      • Should be: gross - fuelprice - expenses - pilotpay(flighttime_stamp) = revenue
    • Pilot pay for given PIREP is being determined using flighttime_stamp method of pilotpay. This is what shows correctly in the ledger table.

    This all started when I added the following to pilot_viewreport.php to display via 'pireps/viewreport'. And I can see now that I am calling Pilot Pay incorrectly. But, this lead to finding that Net Revenue is being computed incorrectly.

    <table class="balancesheet" cellpadding="0" cellspacing="0" width="100%">
    
    	<tr class="balancesheet_header">
    		<td align="" colspan="2">Flight Details</td>
    	</tr>
    	<tr>
    		<td align="right">Gross Revenue: <br /> 
    			(<?php echo $pirep->load;?> load / <?php echo FinanceData::FormatMoney($pirep->price);?> per unit)<br />
    		<td align="right" valign="top"><?php echo FinanceData::FormatMoney($pirep->load * $pirep->price);?></td>
    	</tr>
    	<tr>
    		<td align="right">Fuel Cost: <br />
    			(<?php echo $pirep->fuelused;?> lbs fuel used @ <?php echo $pirep->fuelunitcost?> / lb)<br />
    		<td align="right" valign="top"><?php echo FinanceData::FormatMoney($pirep->fuelused * $pirep->fuelunitcost);?></td>
    	</tr>
    	<tr>
    		<td align="right">Pilot Pay: <br />
    			(per hour based on rank)<br />
    		<td align="right" valign="top"><?php echo FinanceData::FormatMoney($pirep->pilotpay * $pirep->flighttime);?></td>
    	</tr>
    	<tr>
    		<td align="right">Net Revenue: <br />
    			(after <u>all</u> expenses)<br />
    		<td align="right" valign="top"><?php echo FinanceData::FormatMoney($pirep->revenue);?></td>
    	</tr>
    	</table>

    So, it appears that revenue is not correct as it's computed using flighttime instead of flighttime_stamp. And if that's the case, I guess pilotpay is correct.

    If this is what is occurring, is there an easy fix for the revenue computation? At this point, I don't really care if it will be retroactive - but moving forward, I'd like it to be correct.

  14. Your 3 links for PilotData.class.php are for version 2.1.x showing the pilot pay calculations?

    As for PIREPData.class.php, for getPILOTRevenue, lines 841, 1009 and 1038.

    841 - Update a specific PIREP, recalculate finances - references '$pirepinfo->paytype' and looks to be using '$flighttime_stamp'
    
    
    1009 - Populate PIREP with financial info, Set the pilotpay here - references '$payment_type' as in pay per schedule or per hour. But right above this line references 'flighttime'
    
    
    1038 - Calculate gross revenue of PIREP - references '$payment_type = PILOT_PAY_HOURLY'. But again references 'flighttime' three lines later. This section returns '$revenue', as in net revenue.
    

    Lines 1249-1290 looks to actually calculate the pilot payment, uses 'flighttime_stamp', and enters that into the ledger table.

    Lines 1009 and 1038 might be where my issue originates.

    For now, I'm going to ignore the large negative number and assume the version 2.1.x calculations were correct. But am willing to look at it at a later time.

    Thanks!

  15. Thanks for the affirmation on the "lines". Yeah, I over-simplified line 8, but the end result is the same.

    The text file is just to list what shows in the tables. The ledger table shows the correct pilot payment. The pirep table only shows pilotpay rate, not amount of pilotpay for that flight. However, given your 2., 1. PIREPData.class.php GetPIREPRevenue, it seems that net revenue is not calculated correctly - or maybe just not displayed correctly. And that's how I am determining the supposed 'error' - subtracting fuel cost, expenses and net revenue from gross revenue to see what the pilot pay is. Then comparing that number to what's reported in the ledger. That's where I'm seeing the difference.

    In version 2.1.936, I don't recall a ledger table - but need to look closer when I get home later. If it's true there was no ledger table, where was that data located? I don't care if the finances are incorrect prior to moving to 5.5.2. But moving forward, I'd like them to be correct.

    Additionally, after moving to 5.5.2, I noticed that 'Financial Reports' in admin shows 0.00 Pilot Pay for all months prior to conversion month. And a large negative number for pilot pay in the conversion to 5.5.2 month. I'm guessing the large negative number is accounting for all pilot pay prior to the conversion to 5.5.2.

    I'll look at the PIREPData.class.php file in detail later today also.

    Thanks!

  16. Quote

    Just to confirm that your Pilot Pay / Hour is $60 for the rank that you are on and that the schedule doesn't have anything in the the "payforflight" field of the database.

    Yes, $60/hour - nothing in "payforflight" field

    Quote

    Also, in the above example, the algorithm is correct.

    The multiplication is correct - if I were looking for hours and tenths. But I am looking for hours and minutes. $60 x 2.17=$130.20 - and - $60x2:17=$137.00

    Quote

    If you are looking for the pay conversion point (there are many), the main one is here

    Thanks, I will review that.

    My issue is with the minutes conversion. I will have to compare my files with those on GitHub to be sure I didn't muck mine up in some way.

    In the 'ledger' table the pay amount is correct. I wonder where the incorrect amount in my example above is being pulled from? Hmm, more research needed. :wacko:

    A few questions if I may - so I can understand this a bit better..... I numbered the lines to hopefully make it easier

    1 - // This would usually be dynamic
    2 - $pirep->flighttime_stamp = "02:00:00";
    3 - $pirep->pilotpay = "18"; // Sets it to the payrate as phpvms does, will have to override later
    
    4 - // Do the conversion
    5 - $peices = explode(':', $pirep->flighttime_stamp); // 021700
    6 - $minutes = ($peices[0] * 60) + $peices[1]; // 137mins
    
    7 - /* Pretty sure this is the cause */
    8 - $amount = $minutes * ($pirep->pilotpay / 60); // 0.3
    9 - /* The above is basically 137 X (18 / 60) = 0.3 */
    10 - echo $amount; // $41.1

    Line 5 - converts the flighttime_stamp from 02:17:00 to 021700 in the example?

    Line 6 - converts to minutes - $peices[0] = 02 (hours), $peices[1] = 17 (minutes) and the seconds are disgarded?

    Line 8 - takes the minutes from line 6 and multiplies by (pilotpay/60) - so minutes times pay/minute?

    Line 10 - shows total pay for 2:17 flight at $18/hour?

    Since the ledger table amounts are correct - at least since I converted to 5.5.2, I have to believe them. I need to find where the dollar amount I am seeing is being drawn from.

    Here's to hoping version 3 only has one pay conversion point!

    Thanks!

    EDIT:

    Added file attachment showing discrepancy.

     

    Pilot Pay Discrepancy.txt

  17. Maybe a picture of the screen after you add the second charter would help. Does it still list the first charter? Does the second charter appear in the list or does it not allow you to add the second charter?

    As for limiting each pilot to a maximum of 5 charter flights each month, it may be best to make that a rule/policy and monitor it manually. If a pilot submits more than 5 in a calendar month, send them a note reminding them of the policy and then delete or reject their PIREP. 

  18. Now I'm noticing the pilot pay per hour computation for the flight time is messed up.

    Pilot pay / hour - $60
    Flight time - 2.17 (flighttime) 2:17:00 (flighttime_stamp)
    Total pay for this flight - $130.20
    

    So in the above example, the pilot makes $1 for every minute ($60/hour) - TIMES - 137 minutes (2 hours 17 minutes) - EQUALS - $137.00 (should be).

    The $130.20 paid is based on 2.17 hours(approx. 2 hours 10 minutes - 2 and 17/100 hours), not 2:17 hours (2 hours 17 minutes - 2 and 17/60 hours). While this example doesn't show a big discrepancy in dollar value, it's still an error.

    I don't know where to look to try to fix it. I believe the issue is the number after the decimal is being divided by 100 instead of 60. In my example above -  17/100 instead of 17/60.

    I am not sure if this same issue (x/100 versus x/60) is affecting the flight time calculation between kACARS and phpVMS - I don't presently have enough conclusive data, as the kACARS log totals usually equal - but not always - the flight time shown in the 'pireps' table.

    It's not that I mind virtually paying the pilots a little less, but I know one of them will eventually catch this. :blink: LOL - Hopefully there's an easy fix.... or at least it can be incorporated into version 3.

    Any and all help is appreciated!

×
×
  • Create New...