Merge branch 'master' of github.com:akaunting/akaunting
This commit is contained in:
commit
ecdbc74f29
@ -18,10 +18,6 @@ class Report extends FormRequest
|
|||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
'description' => 'required|string',
|
'description' => 'required|string',
|
||||||
'class' => 'required|string',
|
'class' => 'required|string',
|
||||||
'group' => 'required|string',
|
|
||||||
'period' => 'required|string',
|
|
||||||
'basis' => 'required|string',
|
|
||||||
'chart' => 'required|string',
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -348,13 +348,25 @@ th, td {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.rp-border-top-1 {
|
.rp-border-top-1 {
|
||||||
border-top: 1px solid #3c3f72;
|
border-top: 1px solid #e5e5e5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rp-border-bottom-1 {
|
.rp-border-bottom-1 {
|
||||||
border-bottom: 1px solid #3c3f72;
|
border-bottom: 1px solid #e5e5e5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rp-border-top-1 {
|
||||||
|
border-top: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-border-0 {
|
||||||
|
border: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-border-collapse
|
||||||
|
{
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
.rp-float-left {
|
.rp-float-left {
|
||||||
float: left;
|
float: left;
|
||||||
@ -371,7 +383,3 @@ th, td {
|
|||||||
=========================================================
|
=========================================================
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -281,6 +281,10 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<component v-bind:is="add_new_html" @submit="onSubmit"></component>
|
<component v-bind:is="add_new_html" @submit="onSubmit"></component>
|
||||||
|
|
||||||
|
<select :name="name" class="d-none" v-model="real_model">
|
||||||
|
<option v-for="(label, value) in selectOptions" :value="value">{{ label }}</option>
|
||||||
|
</select>
|
||||||
</base-input>
|
</base-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -42,6 +42,20 @@ export default class Form {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (form_element.getAttribute('data-field')) {
|
||||||
|
if (!this[form_element.getAttribute('data-field')]) {
|
||||||
|
var field = {};
|
||||||
|
|
||||||
|
this[form_element.getAttribute('data-field')] = field;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this[form_element.getAttribute('data-field')][name]) {
|
||||||
|
this[form_element.getAttribute('data-field')][name] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (type == 'radio') {
|
if (type == 'radio') {
|
||||||
if (!this[name]) {
|
if (!this[name]) {
|
||||||
this[name] = (form_element.getAttribute('value') ? 1 : 0) || 0;
|
this[name] = (form_element.getAttribute('value') ? 1 : 0) || 0;
|
||||||
|
@ -28,28 +28,54 @@ const app = new Vue({
|
|||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
form: new Form('report'),
|
form: new Form('report'),
|
||||||
bulk_action: new BulkAction('reports')
|
bulk_action: new BulkAction('reports'),
|
||||||
|
report_fields: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onChangeClass(class_name) {
|
onChangeClass(class_name) {
|
||||||
axios.get(url + '/common/reports/groups', {
|
axios.get(url + '/common/reports/fields', {
|
||||||
params: {
|
params: {
|
||||||
class: class_name
|
class: class_name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
let options = response.data.data;
|
let form = this.form;
|
||||||
|
let html = response.data.html;
|
||||||
|
|
||||||
this.$children.forEach(select => {
|
this.report_fields = Vue.component('add-new-component', (resolve, reject) => {
|
||||||
if (select.name == 'group') {
|
resolve({
|
||||||
select.selectOptions = options;
|
template : '<div id="report-fields" class="row col-md-12">' + html + '</div>',
|
||||||
|
|
||||||
|
mixins: [
|
||||||
|
Global
|
||||||
|
],
|
||||||
|
|
||||||
|
created: function() {
|
||||||
|
this.form = form;
|
||||||
|
},
|
||||||
|
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
form: {},
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
form: function (form) {
|
||||||
|
this.$emit("change", form);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
onChangeReportFields(event) {
|
||||||
|
this.form = event;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,9 @@
|
|||||||
|
|
||||||
{{ Form::textareaGroup('description', trans('general.description'), null, null, ['rows' => '3', 'required' => 'required']) }}
|
{{ Form::textareaGroup('description', trans('general.description'), null, null, ['rows' => '3', 'required' => 'required']) }}
|
||||||
|
|
||||||
<component v-bind:is="report_fields"></component>
|
{{ Form::hidden('report', 'invalid', ['data-field' => 'settings']) }}
|
||||||
|
|
||||||
|
<component v-bind:is="report_fields" @change="onChangeReportFields"></component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
{{ Form::checkbox($name, $item->$id, null, [
|
{{ Form::checkbox($name, $item->$id, null, [
|
||||||
'id' => 'checkbox-' . $name . '-' . $item->$id,
|
'id' => 'checkbox-' . $name . '-' . $item->$id,
|
||||||
'class' => 'custom-control-input',
|
'class' => 'custom-control-input',
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
]) }}
|
]) }}
|
||||||
|
|
||||||
<label class="custom-control-label" for="checkbox-{{ $name . '-' . $item->$id}}">
|
<label class="custom-control-label" for="checkbox-{{ $name . '-' . $item->$id}}">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@stack($name . '_input_start')
|
@stack($name . '_input_start')
|
||||||
|
|
||||||
<akaunting-date
|
<akaunting-date
|
||||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||||
:title="'{{ $text }}'"
|
:title="'{{ $text }}'"
|
||||||
@ -18,8 +18,8 @@
|
|||||||
@endif
|
@endif
|
||||||
}"
|
}"
|
||||||
:icon="'fa fa-{{ $icon }}'"
|
:icon="'fa fa-{{ $icon }}'"
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}"
|
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}"
|
||||||
></akaunting-date>
|
></akaunting-date>
|
||||||
|
|
||||||
@stack($name . '_input_end')
|
@stack($name . '_input_end')
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'data-value' => $value,
|
'data-value' => $value,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
'data-name' => $input_name,
|
'data-name' => $input_name,
|
||||||
'data-value' => $input_value,
|
'data-value' => $input_value,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $input_name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
]) !!}
|
]) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'data-value' => $value,
|
'data-value' => $value,
|
||||||
'v-model.lazy' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name,
|
'v-model.lazy' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name,
|
||||||
'v-money' => 'money'
|
'v-money' => 'money'
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
@if (!empty($attributes['collapse']))
|
@if (!empty($attributes['collapse']))
|
||||||
:collapse="true"
|
:collapse="true"
|
||||||
@endif
|
@endif
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
@if (!empty($attributes['collapse']))
|
@if (!empty($attributes['collapse']))
|
||||||
:collapse="true"
|
:collapse="true"
|
||||||
@endif
|
@endif
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'data-value' => $value,
|
'data-value' => $value,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
'class' => 'form-control',
|
'class' => 'form-control',
|
||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
<div class="btn-group btn-group-toggle radio-yes-no" data-toggle="buttons">
|
<div class="btn-group btn-group-toggle radio-yes-no" data-toggle="buttons">
|
||||||
<label class="btn btn-success" @click="form.{{ $name }}=1" v-bind:class="{ active: form.{{ $name }} == 1 }">
|
<label class="btn btn-success" @click="form.{{ $name }}=1" v-bind:class="{ active: form.{{ $name }} == 1 }">
|
||||||
{{ trans('general.yes') }}
|
{{ trans('general.yes') }}
|
||||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
<input type="radio" name="{{ $name }}" id="{{ $name }}-1" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name }}">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: form.{{ $name }} == 0 }">
|
<label class="btn btn-danger" @click="form.{{ $name }}=0" v-bind:class="{ active: form.{{ $name }} == 0 }">
|
||||||
{{ trans('general.no') }}
|
{{ trans('general.no') }}
|
||||||
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name }}">
|
<input type="radio" name="{{ $name }}" id="{{ $name }}-0" v-model="{{ !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name }}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? true : false }}" />
|
<input type="hidden" name="{{ $name }}" value="{{ ($value) ? true : false }}" />
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
])}}"
|
])}}"
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@stack($name . '_input_start')
|
@stack($name . '_input_start')
|
||||||
<akaunting-select
|
|
||||||
|
<akaunting-select
|
||||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||||
:title="'{{ $text }}'"
|
:title="'{{ $text }}'"
|
||||||
@ -8,7 +9,7 @@
|
|||||||
:options="{{ json_encode($values) }}"
|
:options="{{ json_encode($values) }}"
|
||||||
:value="'{{ old($name, $selected) }}'"
|
:value="'{{ old($name, $selected) }}'"
|
||||||
:icon="'{{ $icon }}'"
|
:icon="'{{ $icon }}'"
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
@ -22,5 +23,6 @@
|
|||||||
@endif
|
@endif
|
||||||
:no-data-text="'{{ trans('general.no_data') }}'"
|
:no-data-text="'{{ trans('general.no_data') }}'"
|
||||||
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
||||||
></akaunting-select>
|
></akaunting-select>
|
||||||
|
|
||||||
@stack($name . '_input_end')
|
@stack($name . '_input_end')
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@stack($name . '_input_start')
|
@stack($name . '_input_start')
|
||||||
<akaunting-select
|
|
||||||
|
<akaunting-select
|
||||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||||
:title="'{{ $text }}'"
|
:title="'{{ $text }}'"
|
||||||
@ -28,12 +29,13 @@
|
|||||||
]
|
]
|
||||||
])}}"
|
])}}"
|
||||||
:group="true"
|
:group="true"
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}"
|
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}"
|
||||||
:no-data-text="'{{ trans('general.no_data') }}'"
|
:no-data-text="'{{ trans('general.no_data') }}'"
|
||||||
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
||||||
></akaunting-select>
|
></akaunting-select>
|
||||||
|
|
||||||
@stack($name . '_input_end')
|
@stack($name . '_input_end')
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
@stack($name . '_input_start')
|
@stack($name . '_input_start')
|
||||||
<akaunting-select
|
|
||||||
|
<akaunting-select
|
||||||
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
class="{{ $col }} {{ isset($attributes['required']) ? 'required' : '' }}"
|
||||||
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
:form-classes="[{'has-error': {{ isset($attributes['v-error']) ? $attributes['v-error'] : 'form.errors.get("' . $name . '")' }} }]"
|
||||||
:title="'{{ $text }}'"
|
:title="'{{ $text }}'"
|
||||||
@ -9,12 +10,13 @@
|
|||||||
:value="'{{ old($name, $selected) }}'"
|
:value="'{{ old($name, $selected) }}'"
|
||||||
:icon="'{{ $icon }}'"
|
:icon="'{{ $icon }}'"
|
||||||
:group="true"
|
:group="true"
|
||||||
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model']. ' = $event' : 'form.' . $name . ' = $event' }}"
|
@interface="{{ !empty($attributes['v-model']) ? $attributes['v-model'] . ' = $event' : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.' . $name . ' = $event' : 'form.' . $name . ' = $event' }}"
|
||||||
@if (!empty($attributes['change']))
|
@if (!empty($attributes['change']))
|
||||||
@change="{{ $attributes['change'] }}($event)"
|
@change="{{ $attributes['change'] }}($event)"
|
||||||
@endif
|
@endif
|
||||||
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}"
|
:form-error="{{ isset($attributes['v-error-message']) ? $attributes['v-error-message'] : 'form.errors.get("' . $name . '")' }}"
|
||||||
:no-data-text="'{{ trans('general.no_data') }}'"
|
:no-data-text="'{{ trans('general.no_data') }}'"
|
||||||
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
||||||
></akaunting-select>
|
></akaunting-select>
|
||||||
|
|
||||||
@stack($name . '_input_end')
|
@stack($name . '_input_end')
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'data-value' => $value,
|
'data-value' => $value,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
'data-name' => $name,
|
'data-name' => $name,
|
||||||
'data-value' => $value,
|
'data-value' => $value,
|
||||||
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
'placeholder' => trans('general.form.enter', ['field' => $text]),
|
||||||
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : 'form.' . $name
|
'v-model' => !empty($attributes['v-model']) ? $attributes['v-model'] : !empty($attributes['data-field']) ? 'form.' . $attributes['data-field'] . '.'. $name : 'form.' . $name
|
||||||
], $attributes)) !!}
|
], $attributes)) !!}
|
||||||
|
|
||||||
<div class="invalid-feedback d-block"
|
<div class="invalid-feedback d-block"
|
||||||
|
@ -2,14 +2,30 @@
|
|||||||
@php $type = $field['type']; @endphp
|
@php $type = $field['type']; @endphp
|
||||||
|
|
||||||
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
|
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
|
||||||
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['icon'], $field['attributes']) }}
|
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['icon'], array_merge([
|
||||||
|
'data-field' => 'settings'
|
||||||
|
],
|
||||||
|
$field['attributes'])
|
||||||
|
) }}
|
||||||
@elseif ($type == 'textareaGroup')
|
@elseif ($type == 'textareaGroup')
|
||||||
{{ Form::$type('settings[' . $field['name'] . ']', $field['title']) }}
|
{{ Form::$type('settings[' . $field['name'] . ']', $field['title']) }}
|
||||||
@elseif ($type == 'selectGroup')
|
@elseif ($type == 'selectGroup')
|
||||||
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
|
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([
|
||||||
|
'data-field' => 'settings'
|
||||||
|
],
|
||||||
|
$field['attributes'])
|
||||||
|
) }}
|
||||||
@elseif ($type == 'radioGroup')
|
@elseif ($type == 'radioGroup')
|
||||||
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], 1, $field['enable'], $field['disable'], $field['attributes']) }}
|
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], 1, $field['enable'], $field['disable'], array_merge([
|
||||||
|
'data-field' => 'settings'
|
||||||
|
],
|
||||||
|
$field['attributes'])
|
||||||
|
) }}
|
||||||
@elseif ($type == 'checkboxGroup')
|
@elseif ($type == 'checkboxGroup')
|
||||||
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['items'], $field['value'], $field['id'], $field['attributes']) }}
|
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['items'], $field['value'], $field['id'], array_merge([
|
||||||
|
'data-field' => 'settings'
|
||||||
|
],
|
||||||
|
$field['attributes'])
|
||||||
|
) }}
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="table-responsive overflow-auto mt-4">
|
<div class="table-responsive overflow-auto mt-4">
|
||||||
<table class="table align-items-center">
|
<table class="table align-items-center rp-border-collapse">
|
||||||
@include($class->views['table.header'])
|
@include($class->views['table.header'])
|
||||||
<tbody>
|
<tbody>
|
||||||
@if (!empty($class->rows[$table]))
|
@if (!empty($class->rows[$table]))
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column">{{ trans_choice('general.totals', 1) }}</th>
|
<th class="report-column">{{ trans_choice('general.totals', 1) }}</th>
|
||||||
@php $total_total = 0; @endphp
|
@php $total_total = 0; @endphp
|
||||||
@foreach($class->totals[$table] as $total)
|
@foreach($class->totals[$table] as $total)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
@php $row_total = 0; @endphp
|
@php $row_total = 0; @endphp
|
||||||
<tr>
|
<tr class="rp-border-top-1">
|
||||||
<td class="report-column rp-border-top-1">{{ $class->getTableRowList()[$id] }}</td>
|
<td class="report-column">{{ $class->getTableRowList()[$id] }}</td>
|
||||||
@foreach($items as $item)
|
@foreach($items as $item)
|
||||||
@php $row_total += $item; @endphp
|
@php $row_total += $item; @endphp
|
||||||
<td class="report-column text-right px-0 rp-border-top-1">@money($item, setting('default.currency'), true)</td>
|
<td class="report-column text-right px-0">@money($item, setting('default.currency'), true)</td>
|
||||||
@endforeach
|
@endforeach
|
||||||
<td class="report-column text-right rp-border-top-1">@money($row_total, setting('default.currency'), true)</td>
|
<td class="report-column text-right">@money($row_total, setting('default.currency'), true)</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="table-responsive overflow-auto mt-5">
|
<div class="table-responsive overflow-auto mt-5">
|
||||||
<table class="table align-items-center">
|
<table class="table align-items-center rp-border-collapse">
|
||||||
<tfoot class="border-top-style">
|
<tfoot class="border-top-style">
|
||||||
<tr>
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column rp-border-top-1">{{ trans('reports.net_profit') }}</th>
|
<th class="report-column">{{ trans('reports.net_profit') }}</th>
|
||||||
@foreach($class->net_profit as $profit)
|
@foreach($class->net_profit as $profit)
|
||||||
<th class="report-column text-right px-0 rp-border-top-1">@money($profit, setting('default.currency'), true)</th>
|
<th class="report-column text-right px-0">@money($profit, setting('default.currency'), true)</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
<th class="report-column text-right rp-border-top-1">
|
<th class="report-column text-right">
|
||||||
@money(array_sum($class->net_profit), setting('default.currency'), true)
|
@money(array_sum($class->net_profit), setting('default.currency'), true)
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="table-responsive overflow-auto">
|
<div class="table-responsive overflow-auto">
|
||||||
<table class="table align-items-center">
|
<table class="table align-items-center rp-border-collapse">
|
||||||
<thead class="border-top-style">
|
<thead class="border-top-style">
|
||||||
<tr>
|
<tr class="rp-border-bottom-1">
|
||||||
<th class="report-column text-right rp-border-bottom-1"></th>
|
<th class="report-column text-right"></th>
|
||||||
@foreach($class->dates as $date)
|
@foreach($class->dates as $date)
|
||||||
<th class="report-column text-right px-0 rp-border-bottom-1">{{ $date }}</th>
|
<th class="report-column text-right px-0">{{ $date }}</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
<th class="report-column text-right rp-border-bottom-1">
|
<th class="report-column text-right">
|
||||||
{{ trans_choice('general.totals', 1) }}
|
{{ trans_choice('general.totals', 1) }}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column rp-border-top-1 text-left">{{ trans_choice('general.totals', 1) }}</th>
|
<th class="report-column text-left">{{ trans_choice('general.totals', 1) }}</th>
|
||||||
@php $total_total = 0; @endphp
|
@php $total_total = 0; @endphp
|
||||||
@foreach($class->totals[$table] as $date => $total)
|
@foreach($class->totals[$table] as $date => $total)
|
||||||
@php $total_total += $total; @endphp
|
@php $total_total += $total; @endphp
|
||||||
<th class="report-column text-right px-0 rp-border-top-1">@money($total, setting('default.currency'), true)</th>
|
<th class="report-column text-right px-0">@money($total, setting('default.currency'), true)</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
<th class="report-column text-right rp-border-top-1">@money($total_total, setting('default.currency'), true)</th>
|
<th class="report-column text-right">@money($total_total, setting('default.currency'), true)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="table-responsive overflow-auto">
|
<div class="table-responsive overflow-auto">
|
||||||
<table class="table align-items-center">
|
<table class="table align-items-center rp-border-collapse">
|
||||||
<thead class="border-top-style">
|
<thead class="border-top-style">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="report-column text-right rp-border-bottom-1"></th>
|
<th class="report-column text-right rp-border-bottom-1"></th>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr class="rp-border-top-1">
|
||||||
<th class="report-column rp-border-top-1 text-left">{{ trans('reports.net') }}</th>
|
<th class="report-column text-left">{{ trans('reports.net') }}</th>
|
||||||
@php $total_total = 0; @endphp
|
@php $total_total = 0; @endphp
|
||||||
@foreach($class->totals[$table] as $total)
|
@foreach($class->totals[$table] as $total)
|
||||||
@php $total_total += $total; @endphp
|
@php $total_total += $total; @endphp
|
||||||
<th class="report-column text-right px-0 rp-border-top-1">@money($total, setting('default.currency'), true)</th>
|
<th class="report-column text-right px-0">@money($total, setting('default.currency'), true)</th>
|
||||||
@endforeach
|
@endforeach
|
||||||
<th class="report-column text-right rp-border-top-1">@money($total_total, setting('default.currency'), true)</th>
|
<th class="report-column text-right">@money($total_total, setting('default.currency'), true)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user