Jump to content
Sign in to follow this  

Fuel Tankering Finance

Recommended Posts

I'm trying to figure out how I can modify the app controllers code to following fuel "tankering" logic.


What I have done so far was create another field on the PIREP submit labeled block_in_fuel.

That seems to be working fine.


But now I want the PirepFinanceService to look for the previous pirep for that aircraft.

Is there a function like that already built I could use to accomplish finding that record?


From there I assume I would so something like ...$fuel_used = $pirep->block_fuel - $prevpirep->block_in_fuel


I'm a huge noob to Laravel. So any pointers would be appreciated.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...