Moderators Parkho Posted November 2, 2016 Moderators Report Posted November 2, 2016 Good Day All, Here is another module called Financial Report. This is to give your pilots statistics of your airline as well their own. *Please note this is for phpVMS 5.5x by Simpilot* Install: 1. Download repository at Github 2. Upload to your site in folder's order 3. Access it using: <?php echo url('/finance');?> 4. Include the following paths to your skin/layout.php file in head section: <script type="text/javascript" src="<?php echo fileurl('lib/js/finance.js');?>"></script> <script type="text/javascript" src="<?php echo fileurl('lib/css/finance.css');?>"></script> 5. Enjoy! Demo: At my website www.parkho.ir Screenshots: Quote
TAV1702 Posted November 3, 2016 Report Posted November 3, 2016 That's pretty sweet man. Nicely done. Quote
MrDalle Posted November 3, 2016 Report Posted November 3, 2016 Thanks for the great add-on!!! i just installed everything on my phpvms 5.5.2. Its working but i get a error.. do you have any clue? i attached also a screenshot.. Warning: Invalid argument supplied for foreach() in /var/www/vhosts/dd-photography.de/vas.airberlin-va.de/core/templates/finance/airline_finance.php on line 9 Quote
Moderators Parkho Posted November 3, 2016 Author Moderators Report Posted November 3, 2016 Thanks man. Quote
TAV1702 Posted November 9, 2016 Report Posted November 9, 2016 Thanks for the great add-on!!! i just installed everything on my phpvms 5.5.2. Its working but i get a error.. do you have any clue? i attached also a screenshot.. Warning: Invalid argument supplied for foreach() in /var/www/vhosts/dd-photography.de/vas.airberlin-va.de/core/templates/finance/airline_finance.php on line 9 I have that to and have a clue what it might be. I will report back here in one moment Quote
TAV1702 Posted November 9, 2016 Report Posted November 9, 2016 Ok the verdict is in, it is because we have no airport expenses setup in the admin panel of phpVMS. Once you add a expense, that error will go away. It needs a if statement or something added like if no expense then echo message. that would fix it right up. Nice little module. I like it. Quote
Moderators Parkho Posted November 9, 2016 Author Moderators Report Posted November 9, 2016 I'll make the change. Thanks for the tip. Quote
TAV1702 Posted November 10, 2016 Report Posted November 10, 2016 Oh yeah any time man. I hope it works out. I like this module. I added soem expenses to my test airline today and all is well. It is functional and clean. Quote
Rene Posted November 26, 2016 Report Posted November 26, 2016 i got this error: The template file "/home/990/217990/public_html//core/templates//finance/finance.php.tpl" doesn't exist in /home/990/217990/public_html/core/classes/TemplateSet.class.php on line 248 Quote
Moderators Parkho Posted November 27, 2016 Author Moderators Report Posted November 27, 2016 i got this error: The template file "/home/990/217990/public_html//core/templates//finance/finance.php.tpl" doesn't exist in /home/990/217990/public_html/core/classes/TemplateSet.class.php on line 248 You need to upgrade your phpVMS version to 5.5x by Simpilot. Alternatively, you can change my module core files to match older versions of phpVMS (AKA, TPL version) Quote
TAV1702 Posted December 1, 2016 Report Posted December 1, 2016 (edited) I changed the code a bit to reflect a message instead of an error when there are no expenses added to the airline. In airline_finance.php FIND <?php foreach($expenses as $expense) { ?> <tr> <td><?php echo $expense->name ;?></td> <td><?php echo FinanceData::formatMoney($expense->cost);?></td> <td> <?php if($expense->type == "M") { echo 'Monthly'; } elseif($expense->type == "F") { echo 'Per Flight'; } elseif($expense->type == "P") { echo 'Percent (Month)'; } else { echo 'Percent (Per Flight)'; } ?> </td> </tr> <?php } ?> REPLACE WITH <?php if(!$expenses) {echo '<tr><td align="center" colspan="3">There are no expenses set up at this time!</td></tr>';} else { foreach($expenses as $expense) { ?> <tr> <td><?php echo $expense->name ;?></td> <td><?php echo FinanceData::formatMoney($expense->cost);?></td> <td> <?php if($expense->type == "M") { echo 'Monthly'; } elseif($expense->type == "F") { echo 'Per Flight'; } elseif($expense->type == "P") { echo 'Percent (Month)'; } else { echo 'Percent (Per Flight)'; } ?> </td> </tr> <?php } } ?> Now we get a nice message that there are no expenses setup at this time instead of a error on the page. I am more than sure this will work for an airline that has only one pilot in the setup process that has no flights yet. I am going to go look at it now as we speak and see what happens. Thanks again for another great module Parkho. I like it. I appreciate the share with us. Here is mine skinned with the error gone and a message given. Edited December 1, 2016 by TAV1702 Quote
Moderators Parkho Posted December 1, 2016 Author Moderators Report Posted December 1, 2016 Thanks for the addition. Glad you like it. 1 Quote
Moderators Parkho Posted December 2, 2016 Author Moderators Report Posted December 2, 2016 I have made changes in "airline_finance.php" as per TAV1702 mentioned. Just download and replace the mentioned file at GitHub. Quote
OmerAslan Posted December 2, 2016 Report Posted December 2, 2016 (edited) Hi Parkho, how can i fix them? like make them full screen. thanks. Edited December 2, 2016 by OmerAslan Quote
Moderators Parkho Posted December 2, 2016 Author Moderators Report Posted December 2, 2016 You need to set your table width for them like this: <table width="100%">.........................</table> Quote
OmerAslan Posted December 2, 2016 Report Posted December 2, 2016 You need to set your table width for them like this: <table width="100%">.........................</table> Thanks again. 1 Quote
Moderators Parkho Posted December 2, 2016 Author Moderators Report Posted December 2, 2016 Thanks again. YW. Quote
Moderators ProSkyDesign Posted January 26, 2017 Moderators Report Posted January 26, 2017 On 2/11/2016 at 0:57 PM, Parkho said: Good Day All, Here is another module called Financial Report. This is to give your pilots statistics of your airline as well their own. *Please note this is for phpVMS 5.5x by Simpilot* Install: 1. Download repository at Github 2. Upload to your site in folder's order 3. Access it using: <?php echo url('/finance');?> 4. Enjoy! Demo: At my website www.parkho.ir Screenshots: Nice Add-on There is not for phpvms 5.3? Quote
Moderators Parkho Posted February 2, 2017 Author Moderators Report Posted February 2, 2017 On 1/26/2017 at 8:41 PM, joooseb said: Nice Add-on There is not for phpvms 5.3? Sorry! This add-on is only available for 5.5x by Simpilot. Quote
Moderators ProSkyDesign Posted February 3, 2017 Moderators Report Posted February 3, 2017 11 hours ago, Parkho said: Sorry! This add-on is only available for 5.5x by Simpilot. I edited some files and I get running in phpvm 5.3 Nice add-on! Quote
Moderators Parkho Posted February 3, 2017 Author Moderators Report Posted February 3, 2017 Perfect. Quote
Tummi Posted August 1, 2017 Report Posted August 1, 2017 thanks again for another wonderfull module. currently the css is not working.. https://www.oneengineout.com/index.php/finance any idea how i can make it looking like yours? Quote
Moderators Parkho Posted August 6, 2017 Author Moderators Report Posted August 6, 2017 On 8/2/2017 at 1:10 AM, Tummi said: thanks again for another wonderfull module. currently the css is not working.. https://www.oneengineout.com/index.php/finance any idea how i can make it looking like yours? I usually publish my modules with plain CSS so everyone can change it base on their needs. What i have as skin on my website is totally custom design and is only for showing my modules. Another issue is the javascript conflict on your website or you may have forgotten to add its relative link to your header section. Quote
Tummi Posted August 6, 2017 Report Posted August 6, 2017 i added the link in toppilots as written in the readme of its module. but which link i need to add? Quote
Moderators Parkho Posted July 13, 2018 Author Moderators Report Posted July 13, 2018 On 7/11/2018 at 9:28 PM, loganq said: Thanks for this mod. Quick question. For the expenses, everything is setup as currency. What do I change to make "Percent (Flight)/(Month" as a % not currency. Sorry man. Not a coder here. Not sure if I'm following you by percent flight.🤔 Quote
harryh146 Posted December 12, 2018 Report Posted December 12, 2018 On 7/22/2018 at 10:10 AM, loganq said: Any update on this? Thanks a million! HI I am trying to do the same, however sadly im not able to i think its changed here: <td><?php echo FinanceData::formatMoney($expense->cost);?></td> However i am not sure how to remove the "£" on my page or change it to "%" I will let you know if i make any progress Regards Harry Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.