mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Improve tests, models and views.
This commit is contained in:
		| @@ -1,87 +1,4 @@ | ||||
| <table class="table table-hover table-condensed"> | ||||
|     <thead> | ||||
|     <tr> | ||||
|         <th> </th> | ||||
|         <th>{{ trans('list.description') }}</th> | ||||
|         <th>{{ trans('list.amount') }}</th> | ||||
|         <th class="hidden-sm hidden-xs">{{ trans('list.date') }}</th> | ||||
|         {% if not hideSource %} | ||||
|             <th class="hidden-xs">{{ trans('list.from') }}</th> | ||||
|         {% endif %} | ||||
|         {% if not hideDestination %} | ||||
|             <th class="hidden-xs">{{ trans('list.to') }}</th> | ||||
|         {% endif %} | ||||
|         {# Hide budgets? #} | ||||
|         {% if not hideBudget %} | ||||
|             <th class="hidden-xs"><i class="fa fa-tasks fa-fw" title="{{ trans('list.budget') }}"></i></th> | ||||
|         {% endif %} | ||||
|  | ||||
|         {# Hide categories? #} | ||||
|         {% if not hideCategory %} | ||||
|             <th class="hidden-xs"><i class="fa fa-bar-chart fa-fw" title="{{ trans('list.category') }}"></i></th> | ||||
|         {% endif %} | ||||
|     </tr> | ||||
|     </thead> | ||||
|     <tbody> | ||||
|     {# Make sum: #} | ||||
|     {% set sum = 0 %} | ||||
|     {% for transaction in journals %} | ||||
|         {# add to sum #} | ||||
|         {% set sum = (sum + transaction.transaction_amount) %} | ||||
|         <tr class="drag" data-date="{{ transaction.date.format('Y-m-d') }}" data-id="{{ transaction.journal_id }}"> | ||||
|             <td class="hidden-xs"> | ||||
|                 {{ transaction|transactionIcon }} | ||||
|             </td> | ||||
|             <td> | ||||
|                 <a href="{{ route('transactions.show',transaction.journal_id) }}"> | ||||
|                     {{ transaction|transactionDescription }} | ||||
|                 </a> | ||||
|             </td> | ||||
|             <td> | ||||
|                 {{ transaction|transactionAmount }} | ||||
|             </td> | ||||
|             <td class="hidden-sm hidden-xs"> | ||||
|                 {{ transaction.date.formatLocalized(monthAndDayFormat) }} | ||||
|             </td> | ||||
|             {% if not hideSource %} | ||||
|                 <td class="hidden-xs"> | ||||
|                     {{ transaction|transactionSourceAccount }} | ||||
|                 </td> | ||||
|             {% endif %} | ||||
|             {% if not hideDestination %} | ||||
|                 <td class="hidden-xs"> | ||||
|                     {{ transaction|transactionDestinationAccount }} | ||||
|                 </td> | ||||
|             {% endif %} | ||||
|  | ||||
|             {# Do NOT hide the budget? #} | ||||
|             {% if not hideBudget %} | ||||
|                 <td class="hidden-xs"> | ||||
|                     {{ transaction|transactionBudgets }} | ||||
|                 </td> | ||||
|             {% endif %} | ||||
|  | ||||
|             {# Do NOT hide the category? #} | ||||
|             {% if not hideCategory %} | ||||
|                 <td class="hidden-xs"> | ||||
|                     {{ transaction|transactionCategories }} | ||||
|                 </td> | ||||
|             {% endif %} | ||||
|         </tr> | ||||
|     {% endfor %} | ||||
|     </tbody> | ||||
|     <tfoot> | ||||
|     <tr> | ||||
|         <td colspan="2" style="text-align: right;"><em>{{ 'sum'|_ }}:</em></td> | ||||
|         <td> | ||||
|             {% if inverseAmount %} | ||||
|                 {{ (sum*-1)|formatAmount }} | ||||
|             {% else %} | ||||
|                 {{ sum|formatAmount }} | ||||
|             {% endif %} | ||||
|         </td> | ||||
|     </tr> | ||||
|     </tfoot> | ||||
| </table> | ||||
|  | ||||
| {{ journals.render|raw }} | ||||
| {# | ||||
| TODO REPLACE ME | ||||
| #} | ||||
| <h1 style="color:red;">REPLACE ME</h1> | ||||
		Reference in New Issue
	
	Block a user