| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  | {% extends "./layout/default.twig" %}
 | 
					
						
							| 
									
										
										
										
											2015-06-19 20:59:14 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | {% block breadcrumbs %}
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  |     {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }}
 | 
					
						
							| 
									
										
										
										
											2015-06-19 20:59:14 +02:00
										 |  |  | {% endblock %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% block content %}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |     <form method="POST" action="{{ route('transactions.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
 | 
					
						
							|  |  |  |           enctype="multipart/form-data">
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         <input name="_token" type="hidden" value="{{ csrf_token() }}">
 | 
					
						
							|  |  |  |         <input type="hidden" name="id" value="{{ journal.id }}"/>
 | 
					
						
							|  |  |  |         <input type="hidden" name="what" value="{{ what }}"/>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         <div class="row">
 | 
					
						
							|  |  |  |             <div class="col-lg-6 col-md-12 col-sm-12">
 | 
					
						
							|  |  |  |                 <div class="box box-primary">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'mandatoryFields'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <!-- ALWAYS AVAILABLE -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.text('description',journal.description) }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- SHOW ACCOUNT (FROM) ONLY FOR WITHDRAWALS AND DEPOSITS -->
 | 
					
						
							|  |  |  |                         {% if what == 'deposit' or what == 'withdrawal' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.select('account_id',accounts,data['account_id']) }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- SHOW EXPENSE ACCOUNT ONLY FOR WITHDRAWALS -->
 | 
					
						
							|  |  |  |                         {% if what == 'withdrawal' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.text('expense_account',data['expense_account']) }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- SHOW REVENUE ACCOUNT ONLY FOR DEPOSITS -->
 | 
					
						
							|  |  |  |                         {% if what == 'deposit' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.text('revenue_account',data['revenue_account']) }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- ONLY SHOW FROM/TO ACCOUNT WHEN CREATING TRANSFER -->
 | 
					
						
							|  |  |  |                         {% if what == 'transfer' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.select('account_from_id',accounts,data['account_from_id']) }}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.select('account_to_id',accounts,data['account_to_id']) }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- ALWAYS SHOW AMOUNT -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.amount('amount',data.amount,{'currency' : journal.transactionCurrency}) }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- ALWAYS SHOW DATE -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.date('date',data['date']) }}
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							| 
									
										
										
										
											2015-06-22 17:55:37 +02:00
										 |  |  |                 </div>
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                 <!-- close panel -->
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-22 17:55:37 +02:00
										 |  |  |             </div>
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |             <div class="col-lg-6 col-md-12 col-sm-12">
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'optionalFields'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         <!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
 | 
					
						
							|  |  |  |                         {% if what == 'withdrawal' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.select('budget_id',budgets,data['budget_id']) }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- CATEGORY ALWAYS -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.text('category',data['category']) }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- TAGS -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.text('tags') }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- RELATE THIS TRANSFER TO A PIGGY BANK -->
 | 
					
						
							|  |  |  |                         {% if what == 'withdrawal' and piggies|length > 0 %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.select('piggy_bank_id',piggies,data['piggy_bank_id']) }}
 | 
					
						
							|  |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- ATTACHMENTS -->
 | 
					
						
							| 
									
										
										
										
											2015-07-19 14:30:20 +02:00
										 |  |  |                         {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  |                 </div>
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                 <!-- end of panel for options-->
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 <!-- panel for options -->
 | 
					
						
							|  |  |  |                 <div class="box">
 | 
					
						
							|  |  |  |                     <div class="box-header with-border">
 | 
					
						
							|  |  |  |                         <h3 class="box-title">{{ 'options'|_ }}</h3>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-body">
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.optionsList('update','transaction') }}
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                     <div class="box-footer">
 | 
					
						
							|  |  |  |                         <button type="submit" class="pull-right btn btn-success">{{ ('update_' ~ what)|_ }}</button>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							| 
									
										
										
										
											2015-06-20 21:55:55 +02:00
										 |  |  |                 </div>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  |             </div>
 | 
					
						
							|  |  |  |         </div>
 | 
					
						
							| 
									
										
										
										
											2015-06-22 17:55:37 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |     </form>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | {% endblock %}
 | 
					
						
							|  |  |  | {% block scripts %}
 | 
					
						
							| 
									
										
										
										
											2015-06-22 17:55:37 +02:00
										 |  |  |     <script type="text/javascript">
 | 
					
						
							|  |  |  |         var what = "{{what}}";
 | 
					
						
							|  |  |  |     </script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/bootstrap3-typeahead.min.js"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/bootstrap-tagsinput.min.js"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/transactions.js"></script>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  | {% endblock %}
 | 
					
						
							|  |  |  | {% block styles %}
 | 
					
						
							|  |  |  |     <link href="css/bootstrap-tagsinput.css" type="text/css" rel="stylesheet" media="all">
 | 
					
						
							|  |  |  | {% endblock %}
 |