Jump to content

ProAvia

Administrators
  • Posts

    1695
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by ProAvia

  1. Maybe this will help.... https://www.ablebits.com/office-addins-blog/2014/04/24/convert-excel-csv/ Look in the section titled: Export Excel to CSV with UTF-8 or UTF-16 encoding Definitely don't open and re-save the file in Excel after you do this - or you'll need to do the above procedure again.
  2. So Notepad++ showed the question marks? Then I'd guess it's most probably something to due with your version of Excel. Please keep us updated on your migration and schedule import.
  3. That's exactly the same as my import.php. I'm still using Excel 2003 for my CSV. I know there are some differences in mine and newer versions. Open the CSV file you used for import in Notepad++ (instead of Excel) and see what's in the route column. Maybe that will give us an idea. Another option may be to open the CSV in Open Office (freeware) and see what the route column looks like.
  4. What version of Excel are you using? When you saved the CSV, did you save as CSV (Comma delimited), CSV (MS-DOS) or another format? Also, when saving the CSV, be sure to select Yes if asked if you want to keep the workbook in this format (To keep this format, which leaves out any incompatible features, click Yes.). I seem to remember saving as one of those and had an issue with the import (not the ??? in the route field though). If you saved in one, try another to see if that solves the issue. Are you using the stock Import.php file in admin/modules/Import or an edited one? Maybe post the entire public function processimport () section for review here. I believe in version 5.5.2 it starts on line 314.
  5. Can't say as I've ever seen that before. In the database, is the 'route' field 'Type' set to 'text'? And you imported it as a CSV file - without any changes to the CSV formatting during editing?
  6. Doesn't the present system already send an email to the pilot when a comment is add to a PIREP - that contains a link to the exact PIREP that was commented on? I'm pretty sure mine does that now by default. Hopefully that gets carried over to version 3 - or can easily be added by the VA admin staff.
  7. I don't have this module, so I don't know the exact names of any added database tables. In your database (in "schedules" or another table added by this module), are there any "cruisespeed" entries that equal zero? If so, you probably need to enter a cruise speed > 0. Also not exactly sure, but shouldn't phpVMS be installed in .../public_html/{VA_name_here}/phpvms instead of /home/flymyva/public_html ??
  8. ProAvia

    admin error

    No problem, glad to help!
  9. ProAvia

    admin error

    Ok, good, you're using 5.5.2 Do the PirepAutoAccept files in the template folder end in tpl or php? I'm betting tpl. In any case, change the file extension for all files in the template folder to php. Then, in the PirepAutoAccept.php file in the modules folder, find and replace any file reference of tpl to php and save the file. Let us know if that fixes the issue for you.
  10. ProAvia

    admin error

    Which version of phpVMS are you using - 2.1.x or 5.5.2? Listed the version number is much more helpful than saying it's the latest version. From the image it looks like you are using the PIREP Auto Accept module. If so, are you using version 1 or version 2 of this module? In admin/templates/PirepAutoAccept do the file names end in tpl or php? You may want to have a look through this post:
  11. If you scroll to the bottom of the page, after the error boxes, you should see: ({"totalResultsCount":1,"airports":[{"icao":"OERK","name":"King Khaled International Airport","countryName":"Saudi Arabia","lat":"24.9576","lng":"46.6988","lowlead":"0","jeta":"0"}]})
  12. Are you willing to share the module with the community? Thanks!
  13. This forum isn't the VA community at large - which is what I believe you are meaning. This forum is for those developing/tweaking their phpVMS setups. While divulging your site's URL isn't a requirement - it may help others to assist you in your goals. In any case, you will need to add airports and aircraft to your database, along with schedules/routes. After that, you can use the payware modules you mentioned. As a heads up... Please do not post code from payware modules or ask here for specific help with them - mostly better to ask at the payware developers site. I think you may be able to get general questions answered about them here - or via PM from someone who owns the same module. Hopefully, others will be along to give you additional suggestions.
  14. Hey Ray In looking briefly at his site, it seems that the large black 'Staff Application' is his page title and the smaller blue 'Staff Application.' is a link. Note the period after the blue one - not that I know why the period is there. Could what he's seeing be due to the skin used??? I noticed the title and link after viewing a few of the pages on his site that can be accessed without logging in.
  15. What exactly are you hoping it can do? What version of phpVMS is installed? Do you have a site link?
  16. Thanks for the reply! 'Stuff' usually comes before phpVMS - well, that's what my wife tells me... Yeah, the ledger values seem to be good from the default file (calculatePIREPPayment). RE: v3 - we can always hope!
  17. Have a look at this post Or maybe there is a way to open a support ticket after you log in via your 'Billing Login' on the Simpilot site????
  18. Since this is a payware module from Simpilot, you would be best served by opening a support ticket on the Simpilot site.
  19. I think I may have figured it out. Attached is my current PIREPData.class.php file and the original file as supplied with phpVMS 5.5.2 (PIREPData.class.php.ORIG) for your reference. All line references are to my current file. updateFlightReport - starts line 805, see lines 829-834 formats $flighttime_stamp and $pirepdata['flighttime'] correctly - regardless if initial flighttime contains a period or colon. In a manual PIREP submittal, the hours and minutes can be separated by a colon, a period, no separator, etc. - based on user input. used your initial edit (maybe on page one of this thread) commented out $pilot = PilotData::getPilotData($data['pilotid']); - as I don't think it's needed. And, if I edit a PIREP after a pilot's rank/pay changes, I don't know whether this line would change the pilotpay to the new rate. change 'explode' and calculate lines from $flighttime to $peices. I had changed this earlier in my latest testing to see if it changed anything, which it did not. But left it as $peices anyway. changed $pilot->payrate to $data['pilotpay'] to reflect $data array. Just a lucky guess, as I was trying all kinds other stuff here too. getPIREPRevenue - starts line 1040, see lines 1051-1063 uses $data array and $payment_type - so I tried using $data['flighttime'] and $data['pilotpay'] for the pay calculation. This was after many failed attempts using other parameters - which resulted in the pay being passed as 0 to the $revenue calculation on line 1069 (I think). calculatePIREPayment - starts line 1260 calculates $amount and passed to pireps table left this as original - as it seems to pass the correct data to the ledger table. A few things I changed/added for my specific operation changed .tpl to .php - lines 349, 360, 374, 383 - in the FSFlightKeeper section. added line 633 to display route string in upper case. changed/added 'Send an email to the admin...' after line 758 for my specific needs. I believe both options can be active at one time, but I want Admins to actually review PIREPs instead of just clicking to approve - at least for now. added notes so I remember what stuff does and what I did. In testing, both manual and ACARS PIREPs have been submitted. PIREPs have been viewed, edited, saved and accepted via the admin panel - in various combinations. After a PIREP has been accepted, it's been edited to change the Pilot Pay, saved and/or (re-)accepted. I think I've tried all possible combinations. The revenue and pilotpay appears to compute correctly. The correct $ amount now shows in the pireps table (after save and/or accept). ____________________ PayChecker Final Revenue (per PIREP Pilotpay) is showing $revenue based on $pirep->pilotpay. The $pirep->pilotpay is the hourly pay (or per schedule pay) from the pireps table, not the actual pay based on $pirep->pilotpay times the flight time (in hours and minutes, not tenths). That section can probably be deleted. admin/templates/view_pilot_pireps.php - lines 73 and 74. admin/modules/PayChecker.php - lines 264-286. Everything else in the PayChecker works as advertised - and was a GREAT help in getting the end result we were after. ____________________ I think I figured out the FUEL_DEFAULT_PRICE and FUEL_SURCHARGE stuff too - but will leave that for another time. Disclaimer: I really don't have a good handle on php - but I'm learning slowly. A lot of what I tried on my own was trial and error - along with many hours of staring at the computer screen looking for that "something" that would stand out and editing stuff, not knowing what the results would be. Glad I have a working live site and a test site to mess with. After 60+ posts and a LOT of confusion on my part, I believe it's finally working as it should. If you have the time, please check my work to see if you are getting the same results. After I hear back from you, I'll mark the thread as SOLVED - as least I hope I will. If all this pans out, maybe it will help with the version 3 development too. Thank you once again for all your time and effort! I really do appreciate all the advice and hand-holding! PIREPData.class.php.ORIG PIREPData.class.php
  20. OK, Captain Obvious! LOL - You should be looking at it from my side. I had re-read the entire thread just before doing your last edit, cause I was so confused. I'm still crunching some numbers and will report back with details soon. Basically in the original (default) PIREPData.class.php file that comes with version 5.5.2 - I did this as the only edit Line 825 in default PIREPData.class.php - the one you suggested I leave alone.... From this $pirepdata['flighttime'] = str_replace(':', ',', $pirepdata['flighttime']); To this $pirepdata['flighttime'] = str_replace(':', '.', $pirepdata['flighttime']); That pretty much fixed the major issue I was seeing. It's in the 'updateFlightReport' section. As to why it helped, I haven't a clue. The only thing I'm seeing now is the flighttime (not flighttime_stamp - or flighttime converted to hours:minutes) is still being used when computing pilotpay that is used in the revenue calculation. I need to track if it's only after initial pirp submittal or if it's after an admin uses Edit and Save.The ledger table isn't even populated until an admin takes an action on the submitted PIREP (Accept or Save, I think). As to not passing pilotpay to the ledger table as 'amount' - I think that occurred in your last edit. But it's a non-issue now as I think most of the issue was the comma vs period in link 825 of the original file. As I said, I need to do more testing and document exactly what I'm seeing before we go further - at least I think that might be best for now. Thanks! - I'll post here after I test and document the findings.
  21. Your last isn't passing the pilotpay to the ledger table as I believe it needs $amount instead of $pilotpay at start of this line $pilotpay = ($pirep->pilotpay / 60) * $flighttime_min; # Finalise the payment I changed $pilotpay to $amount without success. ___________________________________________________ Just cause I had nothing better to do ...., I decided to review the original PIREPData.class.php file again. I ran a new PIREP through using that file, went to admin Edit and Save and as expected the revenue number was incorrect. Then I changed the comma in line 825 to a period. From this $pirepdata['flighttime'] = str_replace(':', ',', $pirepdata['flighttime']); To this $pirepdata['flighttime'] = str_replace(':', '.', $pirepdata['flighttime']); Ran another new PIREP through using the edited file (comma to period was only edit), went to admin Edit and Save, checked PayChecker and it seems the results in ledger->amount are correct --- and pirep->revenue (PIREP Revenue in PayChecker) is within $0.40 of Actual Revenue in PayChecker. I went back and edited the PENDING pirep to change the pilotpay and Save -- ledger->amount and pirep->pilotpay updated accordingly, and revenue changed to reflect new amounts. Then went back and edited an older APPROVED pirep - same results. Only discrepancy is Last PIREP Pay and Last PIREP Real Pay. But I think PayChecker is taking the pilotpay rate based on rank (????) for Last PIREP RealPay. Last PIREP Pay Last PIREP Real Pay Status 0.00 160.67 New Pirep PENDING - no Edit - pilotpay @ $40/hour 241.00 160.67 New Pirep PENDING - Edit and Save - pilotpay @ $60/hour 241.00 160.67 Old Pirep APPROVED - Edit and Save - pilotpay @ $60/hour 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.70 The overall function where the edit is located is public static function updateFlightReport ... , starting on line 807. Still need to do more testing - maybe tomorrow to see if the above holds true.
  22. Thanks, I'll definitely look into it after I resolve my Pilot Pay issue ( https://forum.phpvms.net/topic/24313-flight-time-separator/ ) - I've been getting some excellent help from web541 in correcting that issue and am almost there. Pagination is the next thing on the list. Now to find the time to complete it all. I will post back when I find the magic combination. I certainly hope at least basic pagination is included with version 3.
  23. Mine is like your first pic - with the hover effect. I'd provide a link, but most pages on the site require a user to be logged in (something else on my list to change a bit). So, it's a template - cool. Is there an easy way to change to the template to get a display as in your lower pic?
  24. I don't know if this is related or not - or even if it's an issue with the processing elsewhere ... line 825 in the original PIREPData.class.php file $pirepdata['flighttime'] = str_replace(':', ',', $pirepdata['flighttime']); I think that statement basically replaces the ' : ' with a ' , ' . Should the 'comma' in - str_replace(':', ',', $pirepdata be a 'period' instead str_replace(':', '.', $pirepdata Seems it's replacing the colon with a comma instead of replacing the colon with a period. I did try changing it and the results I'm seeing didn't change at all. ____________________ I believe my issue is that, when computing revenue, the pilotpay is getting the payrate from the pilot or ranks tables instead of pilotpay from the pireps table. And if I change the pilotpay when editing the PIREP, the new pilotpay isn't taken into account - because it's using pilotpay from $pilot->payrate. But I don't know what to change or where to change it.
  25. What version of phpVMS are you using - 2.1.x or 5.5.x? If the later, change the .tpl to .php in the core_htmlhead file name above and see if that helps. If that doesn't work, maybe posting the contents of your layout.php or template_start.php would help someone diagnose the issue.
×
×
  • Create New...