-
Posts
1761 -
Joined
-
Last visited
-
Days Won
79
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by ProAvia
-
OK - happy to know it's not just me! Also glad I figured out why my fuel cost changed - although I'm not sure the FUEL_SURCHARGE is fully implemented.... But that's for another time - or maybe I don't really want to know.
-
Yup - correct! Confirm with another 3 PIREPS 'Reset Revenue' - PIREP Gross: 34800 Actual Gross: 34800 Expenses: 0 Fuel Price: $ 18, 022.70 Pilot Pay: $ 241.00 Actual Revenue: $ 16, 536.30 PIREP Revenue: $ 16, 536.30 So the pay isn't being subtracted "somewhere" to give the correct 'revenue' - if I understand you correctly. And 'Reset Revenue' only did the calc internally and didn't seem to change anything in the DB. I'm done for tonight - but tomorrow, I can easily blow the DB out and set it back to where it was before messing with PayChecker and Reset Revenue if needed. Computer is going off now - but will be on tablet to check forum. No, I won't even attempt to mess with the site files/DB from the tablet cause I'll fat finger something and mess it all up. Thanks again!
-
It shows his Last PIREP Pay = $241.00, Last PIREP Real Pay = $241.00 Viewing the particular PIREP in question PIREP Gross: 34800 Actual Gross: 34800 Expenses: 0 Fuel Price: $ 18, 022.70 Pilot Pay: $ 241.00 Actual Revenue: $ 16, 536.30 PIREP Revenue: $ 16, 777.30 Why the discrepancy between the last two entries?
-
Oh - 'Check PIREPS' under Tasks in the sidebar......, then the pilot in question, View PIREPS.
-
PayChecker Pilot Side PIREPData => CalculatePIREPPayment 241 PilotData => resetPilotPay 11254.50 Current Pilot's Payrate (per hour) 60 New Algorithm Using Decimal Form 241 New Algorithm Using Flight Stamp Form 241 What you are getting now (I think) 240.6 Revenue For This PIREP 16536.3 PayChecker Admin Side PIREPData => CalculatePIREPPayment 241 PilotData => resetPilotPay 11254.50 Current Pilot's Payrate (per hour) 60 New Algorithm Using Decimal Form 241 New Algorithm Using Flight Stamp Form 241 What you are getting now (I think) 240.6 Revenue For This PIREP 16536.3 In admin, and view that particular pilot's pireps??? (.../admin/index.php/pilotadmin/viewpilots?action=viewoptions&pilotid=22) --- there is no revenue column. If I choose edit, it shows 'Total Revenue for flight' of 16777.30 . Adding 'Total Revenue for fligh't and 'Total fuel cost', it equals 'Gross Revenue'. 16777.30+18022.70=34800.00 While the pilotpay is showing in the ledger table (as amount), it's not being subtracted from revenue. This is after the pirep has been accepted. I even clicked EDIT and SUBMIT again to see if that changed anything. I'm going to look in PIREPData.class.php again and make sure I have that correct. EDIT: I didn't try the Reset Revenue or Reset Pay + Revenue, only the Go!..... with the correct pirepid
-
In 1.1 above - admin - the fuelprice shows as 18923.90, it should be 18022.70 based on fuelused and fuelunitcost. I figured out why it's showing a different fuelprice. It uses the FUEL_DEFAULT_PRICE times FUEL_SURCHARGE. FUEL_DEFAULT_PRICE (set in local.config) = fuelunitcost --- I think this is fuel price at a hub airport maybe FUEL_SURCHARGE (set in local.config) = percent surcharge added to FUEL_DEFAULT_PRICE Proof - my prices/percentage --- fuelunitprice = 0.68 / surcharge = 5% --- makes fuel price 0.741 ---- 0.741 * 26504# = 18923.856 --- rounded to 18923.9 After the pirep is edited and/or accepted, it uses the 0.68 fuelunitcost. This particular flight was from a hub airport - I need time to check what happens from a non-hub airport. Yeah - it's not subtracting the pilotpay. And I'd like it to subtract pilotpay(flighttime_stamp) instead of the original pilotpay(flighttime). I'll install the updated PayChecker and report back shortly.
-
Nothing like trying to confuse me more. Gross Revenue = gross --- Net Revenue = revenue I think it will recalculate IF you choose to edit a specific pirep. But as it is now, it's not calculating and/or subtracting pilotpay at all. Shouldn't the edit account for pilotpay - hopefully pilotpay(flighttime_stamp) ?? load * price = gross --- how many pax times the amount per pax I think that means if you want a higher gross, then change the load and/or price to a higher number. Not sure which 'single decimal place' or 'trailing zero' you are talking about (please confirm), but it shouldn't have anything to do with the structure being 'float' as 'float' allows the database to hold x amount of integers between a range, and they are able to be a negative number. The differences between the revenue values were hopefully explained above, but the fuelprice intrigues me as it should only be pulling the one value out of the DB. And for the revenue not subtracting the pilot pay, I'll have a look for you, but it seems to work fine on my end. I'm referring to a number such as 50.40 being displayed as 50.4 - it's dropping the zero after the .4 - like Excel does in a cell if you don't have it set to use two decimal places. I guess 'float' might drop trailing zeros. The fuelprice is an odd one. And while the ledger 'amount' for pilotpay is correct, the pireps table and/or the calculations isn't taking it into account. It's all as clear as mud!! LOL So, what do you want me to try next?
-
I think (not absolutely sure) for #3 it needs to be Charter Flight for it to show in the Charter Center. My basic understanding is the module looks for the 'H' so it knows to list it in the Charter Center. Hope someone with more knowledge comes along with an answer for that.
-
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. 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). This was a PIREP that was submitted before the edit, but processed/accepted after the edit. Before accepting pirep admin & viewreport - revenue = -19164.50 / fuel = 18923.90 --- diff of -240.60, which is pilotpay(flighttime) --- 4.01 * 60 After accepting pirep admin DETAILS - revenue = 16777.30 / fuel = 26504# used / gross = 34800.00 admin EDIT - revenue = 16777.30 / fuel = 18022.70 / gross = 16777.30 --- see note about admin skin above viewreport - revenue = 16777.30 / fuel = 18022.70 / gross = 34800.00 gross - fuel = revenue --- doesn't subtract pilotpay at all in ledger table - amount = 241.00 --- this is pilotpay(flighttime_stamp) 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) Before accepting pirep admin - revenue = -18923.90 / fuel = 18923.90 --- fuel equals revenue, no pilotpay at all (but fuel price is incorrect for 0.68/# * 26504#) viewreport - revenue = -18923.90 / fuel = 18022.70 --- fuel price is correct, no idea where the 901.20 diff comes from After accepting pirep admin DETAILS - revenue = 16777.30 / fuel = 26504# used / gross = 34800.00 admin EDIT - revenue = 16777.30 / fuel = 18022.70 / gross = 16777.30 --- fuel correct --- see note about admin skin above viewreport - revenue = 16777.30 / fuel = 18022.70 / gross = 34800.00 --- fuel correct gross - fuel = revenue --- doesn't subtract pilotpay at all (difference in #2 and #3 gross is admin skin) in ledger table - amount = 241.00 --- this is pilotpay(flighttime_stamp) 174 - 174 26504 - 26504 0.68 - 0.68 18022.7 - 18022.7 200 - 200 34800 - 34800 0 - 0 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. Taking a dinner break. Back in a while.
-
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? Is the main airline name the same for the Charter Center? In other words, is the 'code' the same? 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.
-
So, the routes show in a schedule search, but not in Charter Center? Or has the issue resolved itself?
-
You're welcome! I do hope you take my suggestion to review both the php and tpl version. That will go a long way in helping you to understand the errors you may get in the future with other modules and give insight into the workings of the system.
-
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 View PIREP in original example - no change, as expected Edit PIREP in Admin Panel - didn't change anything, but submitted again. 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) 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) 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) After processing (in viewreport) - revenue of 16,777.30, others same as #2 above 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) Before processing (in admin) - revenue of -18,923.90, fuel cost of 18,923.90 (which doesn't equal my 0.68/# fuel cost) (in viewreport) - revenue of -18,923.90, fuel cost of 18,022.72 (which equals my 0.68/# fuel cost) After processing (in admin) (DETAILS tab) - revenue of 16,777.30, (fuel used 26504#), gross of 34,800.00 (174 pax @ $200 each) (EDIT tab) - revenue of 16,777.30, fuel cost of 18,022.70 (26504#), gross of 16,777.30 (174 pax @ $200 each) After processing (in viewreport) - revenue 16,777.30, fuel cost of 18,022.70 (26504#), gross of 34,800.00 (174 pax @ $200 each) 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).
-
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.
-
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: backup the DB, do the replacement in PIREPData.class.php starting at line 1042 see what the results are submit a new PIREP see what the results are again then attempt your last see what happens
-
If you do a schedule search do those flights show up there? http://YourAirlineName/phpvms/index.php/schedules
-
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.
-
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?
-
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?
-
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!
-
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?
-
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!
-
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. 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 - 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. 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!!
-
I just checked, for all months prior to January 2017, Pilot Pay column shows $0.00. This is from when we switched over to phpVMS in May of 2014 through December 2016.
-
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.