Jump to content

Recommended Posts

Posted

I have set the default ground handling fee to zero, as I use the Dispo Special version with Expenses. Unfortunately, they both still show up on the Pirep Finance page, but the default is just blank. Is there a way to not have the default version show up?

Posted (edited)

Exclude rows with 0 (zero) expense or income (for GH Cost, it will be expense, debit) while you are in the foreach loop.

 

As this is mostly a "theming" issue, you can check below example from my theme and apply the change in your duplicate (or your own) theme.

 

https://github.com/FatihKoz/DisposableTheme/blob/e7e635a8d62c9aee90370c4c52104dc0fabb0747/resources/views/layouts/Disposable_v3/pireps/show_finance.blade.php#L58-L64

 

@foreach($pirep->transactions->where('journal_id', $pirep->airline->journal->id) as $entry)
  @if($entry->credit == 0 && $entry->debit == 0) @continue @endif
  <tr>
    <td class="text-start">{{ $entry->memo }}</td>
    <td>@if($entry->credit){{ money($entry->credit, $units['currency']) }}@endif</td>
    <td>@if($entry->debit){{ money($entry->debit, $units['currency']) }}@endif</td>
  </tr>
@endforeach

 

https://laravel.com/docs/9.x/blade#loops

 

Edited by DisposableHero
Posted

My pleasure :)

 

I was a developer, many years ago (while I was a teenager and a youngster around my twenties).That "basic" knowledge comes from those nice years, rest is 2+ years experience with v7 and some refreshed skills for v7 addon/theme development (I needed them, no one was around, so I started developing again), nothing more ;) 

 

Enjoy v7

Join the conversation

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

Guest
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.

Loading...
×
×
  • Create New...