Jump to content

Pilot Financial Report V1.0


Parkho

Recommended Posts

  • Moderators

I have changed the codes in the common file as attached, those of you who installed the module and have the error, replace the attached file.

I wanted code so I could see what flights were losing money for all pilots, not just my own flights.

install the module and address to www.yoursite.com/index.php/pfinance/pilots for all pilots.

PilotFinance.class.php

Link to comment
Share on other sites

One more thing ;)

When I bring up the financial page, it shows "Balance Sheet for Last 3 Months". What is the page that has that text?! I can't find it. I want to change that to "Last 90 days" or something, because if you are in the middle of the month, it will show only 90 days total, so you're first of the 3 months looks like it has only half of the flights it should.

Link to comment
Share on other sites

Parviz, I wanted to show a link when you click on the pilot number, that it would then show ALL the pilots pireps with how much money the flight made or lost. Like when you see it on ones individual pilot center page.....if you know what I mean?!

Link to comment
Share on other sites

  • Moderators

Okay. If you can open both TPL files and look for the following:

FinanceData::formatMoney();

if this is there leave it. If not add it like the following:

<td align="left">Total pilot pay rate is : <strong><?php echo FinanceData::formatMoney($payrate);?> / hr</strong></td>

Link to comment
Share on other sites

  • 4 weeks later...
  • Moderators

hey guys, after uploading the files from the archive and accessing /index.php/pfinance I'm receiving the following error:

An Error Was Encountered

The module "PFINANCE" doesn't exist!

I did upload everything.

I think you didn't install the module correctly. This means the module folder is not where it's supposed to be. You might want to check if the folder pfinance is in lower case or upper in the download and make sure you have uploaded them in order.

Link to comment
Share on other sites

Damn, I've found it. There's a folder name typo in your archive.

I've downloaded FinancialReport_V1.0-master.zip extracted the files, uploaded the content of "core" into "core". The issue is that in the archive there's folder named "module" instead of "modules".

Renamed it and now it works.

Link to comment
Share on other sites

  • 8 months later...

I know this is an old thread now, but Parviz.....I wanted to be able to see a "Balance Sheet" by individual flight, to show the breakdown of expenses. We can do that with for the individual months, but was hoping to be able to show flight by flight for pilots. Is that possible?

Link to comment
Share on other sites

I`ll fool around with it first :) I mean, the balance sheet gets shown for all flights by month, I assume I can just add in a variable of some sort to show flights individually by pilot ID, correct?! Or is the current module more complex than that?! Keep in mind, I have not really delved into it so far.

Link to comment
Share on other sites

  • Moderators

It's not that complicated as long as you know what you want. If you want the results for each flight individually, you can use the pirep gross and revenue variable and basically show them in a table for a particular pilot. If you want to show the costs for each flight then you'll have to go deeper and pull some more data out using expenses and finance tables. If you need to calculate the fuel cost you can multiply the fuel burned by the fuel cost and get that data. it really depends on what you want to do.;)

Link to comment
Share on other sites

  • Moderators

Hi,

I hope that you can help me, I want this in my profile (pilot center) but when i try this code:

<?php MainController::Run('Pfinance') ;?> i see nothing,

Michael

Try this:

<?php MainController::Run('Pfinance','index', 2) ;?>

Link to comment
Share on other sites

  • Moderators

MainController::run() command needs 2 variables and a number to return the results. Yours had only one variable. Pfinance is the first which is the module file now the second one is the functions inside the module like index...etc, so index would be a function inside the module file "PFinance" in this case number doesn't really matter, so you could put any numbers. :D

Link to comment
Share on other sites

  • 5 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...