mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Big bunch of code to improve test coverage.
This commit is contained in:
		| @@ -7,7 +7,7 @@ | ||||
| {% block content %} | ||||
|  | ||||
|     {# upper show-all instruction #} | ||||
|     {% if periods.count > 0 %} | ||||
|     {% if periods|length > 0 %} | ||||
|         <div class="row"> | ||||
|             <div class="col-lg-offset-10 col-lg-2 col-md-offset-9 col-md-3 col-sm-12 col-xs-12"> | ||||
|                 <p class="small text-center"><a href="{{ route('categories.no-category.all') }}">{{ 'showEverything'|_ }}</a></p> | ||||
| @@ -16,14 +16,14 @@ | ||||
|     {% endif %} | ||||
|  | ||||
|     <div class="row"> | ||||
|         <div class="{% if periods.count > 0 %}col-lg-10 col-md-9 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}"> | ||||
|         <div class="{% if periods|length > 0 %}col-lg-10 col-md-9 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}"> | ||||
|             <div class="box"> | ||||
|                 <div class="box-header with-border"> | ||||
|                     <h3 class="box-title">{{ subTitle }}</h3> | ||||
|                 </div> | ||||
|                 <div class="box-body "> | ||||
|  | ||||
|                     {% if periods.count > 0 %} | ||||
|                     {% if periods|length > 0 %} | ||||
|                         {% include 'list.groups' %} | ||||
|                         <p> | ||||
|                             <i class="fa fa-calendar"></i> | ||||
| @@ -40,51 +40,16 @@ | ||||
|             </div> | ||||
|         </div> | ||||
|  | ||||
|         {% if periods.count > 0 %} | ||||
|             <div class="col-lg-2 col-md-3 col-sm-12 col-xs-12"> | ||||
|                 {% for period in periods %} | ||||
|                     {% if period.count > 0 %} | ||||
|                         <div class="box {% if period.date == end %}box-solid box-primary{% endif %}"> | ||||
|                             <div class="box-header with-border"> | ||||
|                                 <h3 class="box-title"><a href="{{ route('categories.no-category', [period.start.format('Y-m-d'), period.end.format('Y-m-d')]) }}">{{ period.name }}</a> | ||||
|                                 </h3> | ||||
|                             </div> | ||||
|                             <div class="box-body no-padding"> | ||||
|                                 <table class="table table-hover"> | ||||
|                                     <tr> | ||||
|                                         <td style="width:33%;">{{ 'transactions'|_ }}</td> | ||||
|                                         <td style="text-align: right;">{{ period.count }}</td> | ||||
|                                     </tr> | ||||
|                                     {% if period.spent != 0 %} | ||||
|                                         <tr> | ||||
|                                             <td style="width:33%;">{{ 'spent'|_ }}</td> | ||||
|                                             <td style="text-align: right;">{{ period.spent|formatAmount }}</td> | ||||
|                                         </tr> | ||||
|                                     {% endif %} | ||||
|                                     {% if period.earned != 0 %} | ||||
|                                         <tr> | ||||
|                                             <td style="width:33%;">{{ 'earned'|_ }}</td> | ||||
|                                             <td style="text-align: right;">{{ period.earned|formatAmount }}</td> | ||||
|                                         </tr> | ||||
|                                     {% endif %} | ||||
|                                     {% if period.transferred != 0 %} | ||||
|                                         <tr> | ||||
|                                             <td style="width:33%;">{{ 'transferred'|_ }}</td> | ||||
|                                             <td style="text-align: right;" class="text-info">{{ period.transferred|formatAmountPlain }}</td> | ||||
|                                         </tr> | ||||
|                                     {% endif %} | ||||
|                                 </table> | ||||
|                             </div> | ||||
|                         </div> | ||||
|                     {% endif %} | ||||
|                 {% endfor %} | ||||
|         {% if periods|length > 0 %} | ||||
|             <div class="col-lg-2 col-md-4 col-sm-12 col-xs-12"> | ||||
|                 {% include 'list.periods' %} | ||||
|             </div> | ||||
|         {% endif %} | ||||
|  | ||||
|     </div> | ||||
|  | ||||
|     {# lower show-all instruction #} | ||||
|     {% if periods.count > 0 %} | ||||
|     {% if periods|length > 0 %} | ||||
|         <div class="row"> | ||||
|             <div class="col-lg-offset-10 col-lg-2 col-md-offset-9 col-md-3 col-sm-12 col-xs-12"> | ||||
|                 <p class="small text-center"><a href="{{ route('categories.no-category',['all']) }}">{{ 'showEverything'|_ }}</a></p> | ||||
|   | ||||
| @@ -49,7 +49,7 @@ | ||||
|             </div> | ||||
|         {% endif %} | ||||
|     </div> | ||||
|     {% if periods.count > 0 %} | ||||
|     {% if periods|length > 0 %} | ||||
|         <div class="row"> | ||||
|             <div class="col-lg-offset-10 col-lg-2 col-md-offset-10 col-md-2 col-sm-12 col-xs-12"> | ||||
|                 <p class="small text-center"><a href="{{ route('categories.show.all',[category.id]) }}">{{ 'showEverything'|_ }}</a></p> | ||||
| @@ -58,14 +58,14 @@ | ||||
|     {% endif %} | ||||
|  | ||||
|     <div class="row"> | ||||
|         <div class="{% if periods.count > 0 %}col-lg-10 col-md-8 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}"> | ||||
|         <div class="{% if periods|length > 0 %}col-lg-10 col-md-8 col-sm-12 col-xs-12{% else %}col-lg-12 col-md-12 col-sm-12 col-xs-12{% endif %}"> | ||||
|  | ||||
|             <div class="box"> | ||||
|                 <div class="box-header with-border"> | ||||
|                     <h3 class="box-title">{{ 'transactions'|_ }}</h3> | ||||
|                 </div> | ||||
|                 <div class="box-body"> | ||||
|                     {% if periods.count > 0 %} | ||||
|                     {% if periods|length > 0 %} | ||||
|                         {% include 'list.groups' %} | ||||
|                         <p> | ||||
|                             <i class="fa fa-calendar"></i> | ||||
| @@ -85,7 +85,7 @@ | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|         {% if periods.count > 0 %} | ||||
|         {% if periods|length > 0 %} | ||||
|             <div class="col-lg-2 col-md-4 col-sm-12 col-xs-12"> | ||||
|                 {% include 'list.periods' %} | ||||
|             </div> | ||||
|   | ||||
| @@ -39,6 +39,19 @@ | ||||
|                     {% endif %} | ||||
|                 {% endfor %} | ||||
|  | ||||
|                 {% for entry in period.transferred %} | ||||
|                     {% if entry.amount != 0 %} | ||||
|                         <tr> | ||||
|                             <td style="width:33%;">{{ 'transferred'|_ }}</td> | ||||
|                             <td style="text-align: right;"> | ||||
|                                 <span title="{{ entry.count }}"> | ||||
|                                     {{ formatAmountBySymbol(entry.amount*-1, entry.currency_symbol, entry.currency_decimal_places) }} | ||||
|                                 </span> | ||||
|                             </td> | ||||
|                         </tr> | ||||
|                     {% endif %} | ||||
|                 {% endfor %} | ||||
|  | ||||
|                 {% for entry in period.transferred_away %} | ||||
|                     {% if entry.amount != 0 %} | ||||
|                         <tr> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user