Moderators Parkho Posted October 26, 2012 Author Moderators Report Share Posted October 26, 2012 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 More sharing options...
CPC900 Posted October 31, 2012 Report Share Posted October 31, 2012 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 More sharing options...
Moderators Parkho Posted October 31, 2012 Author Moderators Report Share Posted October 31, 2012 Open Finance.php in admin/modules/Finance and look for the following: $this->set('title', 'Balance Sheet for Last 3 Months'); 1 Link to comment Share on other sites More sharing options...
CPC900 Posted October 31, 2012 Report Share Posted October 31, 2012 Thanks Link to comment Share on other sites More sharing options...
CPC900 Posted November 5, 2012 Report Share Posted November 5, 2012 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 More sharing options...
Moderators Parkho Posted November 5, 2012 Author Moderators Report Share Posted November 5, 2012 Yes I know what you mean but don't you think that would make a long list?! Link to comment Share on other sites More sharing options...
CPC900 Posted November 5, 2012 Report Share Posted November 5, 2012 Well, it would need pagination Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 5, 2012 Author Moderators Report Share Posted November 5, 2012 Yes. Okay I will look into it. Link to comment Share on other sites More sharing options...
CPC900 Posted November 5, 2012 Report Share Posted November 5, 2012 Also, the Pilot id's dropped the leading zero's. So where I had CPC0001 for a pilot number, it shows CPC1 on the http://www.canadianclassicairlines.com/CPC/index.php/pfinance/pilots page!? Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 5, 2012 Author Moderators Report Share Posted November 5, 2012 Yes it's always the case which is normal. Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 5, 2012 Author Moderators Report Share Posted November 5, 2012 Have you changed the codes cause I see numbers with a lot of digits. Link to comment Share on other sites More sharing options...
CPC900 Posted November 5, 2012 Report Share Posted November 5, 2012 Do you mean where it sys Total gross income in CP Air Virtual Airlines is: at the top?? Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 6, 2012 Author Moderators Report Share Posted November 6, 2012 Yes Link to comment Share on other sites More sharing options...
CPC900 Posted November 6, 2012 Report Share Posted November 6, 2012 No, I don't believe I changed anything?! Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 6, 2012 Author Moderators Report Share Posted November 6, 2012 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 More sharing options...
CPC900 Posted November 6, 2012 Report Share Posted November 6, 2012 <td align="left">Total pilot pay rate is : <strong><?php echo FinanceData::formatMoney($payrate);?> / hr</strong></td> That was already there in both .tpl files Link to comment Share on other sites More sharing options...
loplo Posted November 29, 2012 Report Share Posted November 29, 2012 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. Link to comment Share on other sites More sharing options...
Moderators Parkho Posted November 30, 2012 Author Moderators Report Share Posted November 30, 2012 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 More sharing options...
loplo Posted November 30, 2012 Report Share Posted November 30, 2012 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 More sharing options...
CPC900 Posted July 31, 2013 Report Share Posted July 31, 2013 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 More sharing options...
Moderators Parkho Posted July 31, 2013 Author Moderators Report Share Posted July 31, 2013 Of course it's possible. Link to comment Share on other sites More sharing options...
CPC900 Posted August 1, 2013 Report Share Posted August 1, 2013 Is that easy for me to figure out I am willing to let you tell me or is that a payware mod?! Either way, I am still interested Link to comment Share on other sites More sharing options...
Moderators Parkho Posted August 1, 2013 Author Moderators Report Share Posted August 1, 2013 Well. If you want me to create a module for you then it'll cost you but if you wanna start the module yourself then I'll help you out finishing it. Link to comment Share on other sites More sharing options...
CPC900 Posted August 1, 2013 Report Share Posted August 1, 2013 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 More sharing options...
Moderators Parkho Posted August 1, 2013 Author Moderators Report Share Posted August 1, 2013 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 More sharing options...
michael Kraan Posted August 3, 2013 Report Share Posted August 3, 2013 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 Link to comment Share on other sites More sharing options...
Moderators Parkho Posted August 3, 2013 Author Moderators Report Share Posted August 3, 2013 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 More sharing options...
michael Kraan Posted August 3, 2013 Report Share Posted August 3, 2013 Try this: <?php MainController::Run('Pfinance','index', 2) ;?> yes it works good! but why don't work my code:<?php MainController::Run('Pfinance') ;?> than i now it for the next time Link to comment Share on other sites More sharing options...
Moderators Parkho Posted August 3, 2013 Author Moderators Report Share Posted August 3, 2013 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. Link to comment Share on other sites More sharing options...
Edwin Posted January 8, 2014 Report Share Posted January 8, 2014 Hi, Tried to download this, but link is dead, can you please reupload it? Link to comment Share on other sites More sharing options...
Recommended Posts