| 
									
										
										
										
											2016-11-06 08:11:43 +01:00
										 |  |  | {% extends "./layout/default" %}
 | 
					
						
							| 
									
										
										
										
											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 }}"/>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-30 12:46:21 +02:00
										 |  |  |         {% if errors.all|length > 0 %}
 | 
					
						
							| 
									
										
										
										
											2016-08-27 03:50:35 +02:00
										 |  |  |             <div class="row">
 | 
					
						
							|  |  |  |                 <div class="col-lg-12">
 | 
					
						
							|  |  |  |                     <h3 class="text-danger">{{ 'errors'|_ }}</h3>
 | 
					
						
							|  |  |  |                     <ul>
 | 
					
						
							|  |  |  |                         {% for err in errors.all %}
 | 
					
						
							|  |  |  |                             <li class="text-danger">{{ err }}</li>
 | 
					
						
							|  |  |  |                         {% endfor %}
 | 
					
						
							|  |  |  |                     </ul>
 | 
					
						
							|  |  |  |                 </div>
 | 
					
						
							| 
									
										
										
										
											2016-04-30 12:46:21 +02:00
										 |  |  |             </div>
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |         <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">
 | 
					
						
							| 
									
										
										
										
											2016-10-21 21:41:31 +02:00
										 |  |  |                         {# ALWAYS AVAILABLE #}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                         {{ ExpandedForm.text('description',journal.description) }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-21 21:41:31 +02:00
										 |  |  |                         {# SELECTABLE SOURCE ACCOUNT ONLY FOR WITHDRAWALS AND TRANSFERS #}
 | 
					
						
							| 
									
										
										
										
											2016-04-30 12:46:21 +02:00
										 |  |  |                         {% if what == 'transfer' or what == 'withdrawal' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.select('source_account_id',assetAccounts, data.source_account_id, {label: trans('form.asset_source_account')}) }}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-10-21 21:41:31 +02:00
										 |  |  |                         {# FREE FORMAT SOURCE ACCOUNT ONLY FOR DEPOSITS #}
 | 
					
						
							| 
									
										
										
										
											2016-04-30 12:46:21 +02:00
										 |  |  |                         {% if what == 'deposit' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.text('source_account_name',data.source_account_name, {label: trans('form.revenue_account')}) }}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-30 12:46:21 +02:00
										 |  |  |                         <!-- FREE FORMAT DESTINATION ACCOUNT ONLY FOR EXPENSES -->
 | 
					
						
							|  |  |  |                         {% if what == 'withdrawal' %}
 | 
					
						
							|  |  |  |                             {{ ExpandedForm.text('destination_account_name',data.destination_account_name, {label: trans('form.expense_account')}) }}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-20 07:51:26 +02:00
										 |  |  |                         <!-- SELECTABLE DESTINATION ACCOUNT ONLY FOR TRANSFERS AND DEPOSITS -->
 | 
					
						
							|  |  |  |                         {% if what == 'transfer' or what == 'deposit' %}
 | 
					
						
							| 
									
										
										
										
											2016-04-30 12:46:21 +02:00
										 |  |  |                             {{ ExpandedForm.select('destination_account_id',assetAccounts, data.destination_account_id, {label: trans('form.asset_destination_account')} ) }}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                         {% 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' %}
 | 
					
						
							| 
									
										
										
										
											2016-03-20 17:12:34 +01:00
										 |  |  |                             {{ ExpandedForm.select('budget_id',budgetList,data['budget_id']) }}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                         {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- CATEGORY ALWAYS -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.text('category',data['category']) }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <!-- TAGS -->
 | 
					
						
							|  |  |  |                         {{ ExpandedForm.text('tags') }}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-04 16:04:36 +01:00
										 |  |  |                         {# NO PIGGY BANK #}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                     </div>
 | 
					
						
							| 
									
										
										
										
											2015-05-02 19:19:47 +02:00
										 |  |  |                 </div>
 | 
					
						
							| 
									
										
										
										
											2016-09-04 16:21:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 <!-- explain if necessary -->
 | 
					
						
							|  |  |  |                 {% if | 
					
						
							|  |  |  |                 not optionalFields.interest_date or
 | 
					
						
							|  |  |  |                 not optionalFields.book_date or
 | 
					
						
							|  |  |  |                 not optionalFields.process_date or
 | 
					
						
							|  |  |  |                 not optionalFields.due_date or
 | 
					
						
							|  |  |  |                 not optionalFields.payment_date or
 | 
					
						
							| 
									
										
										
										
											2016-09-10 18:36:52 +02:00
										 |  |  |                 not optionalFields.invoice_date or
 | 
					
						
							| 
									
										
										
										
											2016-10-21 21:41:31 +02:00
										 |  |  |                 not optionalFields.internal_reference or
 | 
					
						
							| 
									
										
										
										
											2016-09-04 16:21:51 +02:00
										 |  |  |                 not optionalFields.notes or
 | 
					
						
							|  |  |  |                 not optionalFields.attachments %}
 | 
					
						
							|  |  |  |                     <p class="text-center text-success"><i class="fa fa-info-circle" aria-hidden="true"></i>
 | 
					
						
							| 
									
										
										
										
											2016-12-05 21:58:23 +01:00
										 |  |  |                         <em>{{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}</em></p>
 | 
					
						
							| 
									
										
										
										
											2016-09-04 16:21:51 +02:00
										 |  |  |                 {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 <!-- box for dates -->
 | 
					
						
							|  |  |  |                 {% if | 
					
						
							| 
									
										
										
										
											2016-10-14 17:14:54 +02:00
										 |  |  |                 optionalFields.interest_date or
 | 
					
						
							|  |  |  |                 optionalFields.book_date or
 | 
					
						
							|  |  |  |                 optionalFields.process_date or
 | 
					
						
							|  |  |  |                 optionalFields.due_date or
 | 
					
						
							|  |  |  |                 optionalFields.payment_date or
 | 
					
						
							|  |  |  |                 optionalFields.invoice_date or
 | 
					
						
							|  |  |  |                 data.interest_date or
 | 
					
						
							|  |  |  |                 data.book_date or
 | 
					
						
							|  |  |  |                 data.process_date or
 | 
					
						
							|  |  |  |                 data.due_date or
 | 
					
						
							|  |  |  |                 data.payment_date %}
 | 
					
						
							| 
									
										
										
										
											2016-09-04 16:21:51 +02:00
										 |  |  |                     <div class="box">
 | 
					
						
							|  |  |  |                         <div class="box-header with-border">
 | 
					
						
							|  |  |  |                             <h3 class="box-title">{{ 'optional_field_meta_dates'|_ }}</h3>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                         <div class="box-body">
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             {% if optionalFields.interest_date or data['interest_date'] %}
 | 
					
						
							|  |  |  |                                 <!-- INTEREST DATE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.date('interest_date',data['interest_date']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             {% if optionalFields.book_date or data['book_date'] %}
 | 
					
						
							|  |  |  |                                 <!-- BOOK DATE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.date('book_date',data['book_date']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             {% if optionalFields.process_date or data['process_date'] %}
 | 
					
						
							|  |  |  |                                 <!-- PROCESSING DATE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.date('process_date',data['process_date']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             {% if optionalFields.due_date or data['due_date'] %}
 | 
					
						
							|  |  |  |                                 <!-- DUE DATE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.date('due_date',data['due_date']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             {% if optionalFields.payment_date or data['payment_date'] %}
 | 
					
						
							|  |  |  |                                 <!-- PAYMENT DATE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.date('payment_date',data['payment_date']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-10 18:36:52 +02:00
										 |  |  |                             {% if optionalFields.invoice_date or data['invoice_date'] %}
 | 
					
						
							|  |  |  |                                 <!-- INVOICE DATE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.date('invoice_date',data['invoice_date']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-04 16:21:51 +02:00
										 |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 <!-- box for business fields -->
 | 
					
						
							|  |  |  |                 {% if | 
					
						
							| 
									
										
										
										
											2016-10-14 17:14:54 +02:00
										 |  |  |                 optionalFields.internal_reference or
 | 
					
						
							|  |  |  |                 optionalFields.notes or
 | 
					
						
							|  |  |  |                 data['interal_reference'] or
 | 
					
						
							|  |  |  |                 data['notes'] %}
 | 
					
						
							| 
									
										
										
										
											2016-09-04 16:21:51 +02:00
										 |  |  |                     <div class="box">
 | 
					
						
							|  |  |  |                         <div class="box-header with-border">
 | 
					
						
							|  |  |  |                             <h3 class="box-title">{{ 'optional_field_meta_business'|_ }}</h3>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                         <div class="box-body">
 | 
					
						
							|  |  |  |                             {% if optionalFields.internal_reference or data['interal_reference'] %}
 | 
					
						
							|  |  |  |                                 <!-- REFERENCE -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.text('internal_reference', data['interal_reference']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             {% if optionalFields.notes or data['notes'] %}
 | 
					
						
							|  |  |  |                                 <!-- NOTES -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.textarea('notes', data['notes']) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 <!-- box for attachments -->
 | 
					
						
							|  |  |  |                 {% if optionalFields.attachments %}
 | 
					
						
							|  |  |  |                     <div class="box">
 | 
					
						
							|  |  |  |                         <div class="box-header with-border">
 | 
					
						
							|  |  |  |                             <h3 class="box-title">{{ 'optional_field_attachments'|_ }}</h3>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                         <div class="box-body">
 | 
					
						
							|  |  |  |                             {% if optionalFields.attachments %}
 | 
					
						
							|  |  |  |                                 <!-- ATTACHMENTS -->
 | 
					
						
							|  |  |  |                                 {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }}
 | 
					
						
							|  |  |  |                             {% endif %}
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							|  |  |  |                     </div>
 | 
					
						
							|  |  |  |                 {% endif %}
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 <!-- 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') }}
 | 
					
						
							| 
									
										
										
										
											2016-05-20 07:51:26 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                         <div class="form-group" id="do_split_holder">
 | 
					
						
							|  |  |  |                             <label for="ffInput_do_split" class="col-sm-4 control-label">{{ 'do_split'|_ }}</label>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                             <div class="col-sm-8">
 | 
					
						
							|  |  |  |                                 <p class="form-control-static">
 | 
					
						
							| 
									
										
										
										
											2016-12-06 08:59:08 +01:00
										 |  |  |                                     <a href="{{ route('transactions.split.edit', journal.id) }}">{{ ('split_this_'~what)|_ }}</a>
 | 
					
						
							| 
									
										
										
										
											2016-05-20 07:51:26 +02:00
										 |  |  |                                 </p>
 | 
					
						
							|  |  |  |                             </div>
 | 
					
						
							|  |  |  |                         </div>
 | 
					
						
							| 
									
										
										
										
											2015-07-18 21:46:16 +02:00
										 |  |  |                     </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">
 | 
					
						
							| 
									
										
										
										
											2015-12-18 16:37:45 +01:00
										 |  |  |         var what = "{{ what }}";
 | 
					
						
							| 
									
										
										
										
											2015-06-22 17:55:37 +02:00
										 |  |  |     </script>
 | 
					
						
							| 
									
										
										
										
											2016-04-10 17:51:51 +02:00
										 |  |  |     <script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/lib/bootstrap-tagsinput.min.js"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/ff/transactions/create-edit.js"></script>
 | 
					
						
							|  |  |  |     <script type="text/javascript" src="js/ff/transactions/edit.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 %}
 |