Change currency money group issue solved.

This commit is contained in:
Cüneyt Şentürk 2020-02-29 11:40:33 +03:00
parent 0d109aa89c
commit ba79655afa
17 changed files with 66 additions and 95 deletions

View File

@ -43,6 +43,7 @@ export default {
data: function () { data: function () {
return { return {
component: '', component: '',
currency: null,
} }
}, },
@ -183,16 +184,30 @@ export default {
this.form.currency_code = response.data.currency_code; this.form.currency_code = response.data.currency_code;
this.form.currency_rate = response.data.currency_rate; this.form.currency_rate = response.data.currency_rate;
this.money.decimal = response.data.decimal_mark; this.currency = response.data;
this.money.thousands = response.data.thousands_separator;
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
this.money.precision = response.data.precision;
}) })
.catch(error => { .catch(error => {
}); });
}, },
// Change currency get money
onChangeCurrency(currency_code) {
axios.get(url + '/settings/currencies/currency', {
params: {
code: currency_code
}
})
.then(response => {
this.currency = response.data;
this.form.currency_code = response.data.code;
this.form.currency_rate = response.data.rate;
})
.catch(error => {
});
},
// Pages limit change
onChangePaginationLimit(event) { onChangePaginationLimit(event) {
let path = ''; let path = '';
@ -232,6 +247,7 @@ export default {
window.location.href = path; window.location.href = path;
}, },
// Dynamic component get path view and show it.
onDynamicComponent(path) onDynamicComponent(path)
{ {
axios.get(path) axios.get(path)

View File

@ -1,4 +1,3 @@
import axios from "axios";
import NProgress from 'nprogress' import NProgress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
import NProgressAxios from './nprogress-axios'; import NProgressAxios from './nprogress-axios';
@ -78,7 +77,7 @@ export default class BulkAction {
this.loading = true; this.loading = true;
if (this.value != 'export') { if (this.value != 'export') {
axios.post(path, { window.axios.post(path, {
'handle': this.value, 'handle': this.value,
'selected': this.selected 'selected': this.selected
}) })
@ -97,7 +96,7 @@ export default class BulkAction {
//window.location.reload(false); //window.location.reload(false);
}); });
} else { } else {
axios({ window.axios({
url: path, url: path,
method: 'POST', method: 'POST',
data:{ data:{
@ -154,7 +153,7 @@ export default class BulkAction {
var item = event.target; var item = event.target;
var status = (event.target.checked) ? 'enable' : 'disable'; var status = (event.target.checked) ? 'enable' : 'disable';
axios.get(this.path + '/' + item_id + '/' + status) window.axios.get(this.path + '/' + item_id + '/' + status)
.then(response => { .then(response => {
var type = (response.data.success) ? 'success' : 'warning'; var type = (response.data.success) ? 'success' : 'warning';

View File

@ -32,22 +32,4 @@ const app = new Vue({
} }
}, },
methods:{
onChangeCurrency(currency_code) {
axios.get(url + '/settings/currencies/currency', {
params: {
code: currency_code
}
})
.then(response => {
this.money.decimal = response.data.decimal_mark;
this.money.thousands = response.data.thousands_separator;
this.money.prefix = (response.data.symbol_first) ? response.data.symbol : '';
this.money.suffix = !(response.data.symbol_first) ? response.data.symbol : '';
this.money.precision = response.data.precision;
})
.catch(error => {
});
}
}
}); });

View File

@ -36,7 +36,6 @@ const app = new Vue({
cleared_amount: 0, cleared_amount: 0,
difference: 0, difference: 0,
}, },
currency: null,
} }
}, },

View File

@ -49,7 +49,6 @@ const app = new Vue({
transaction: [], transaction: [],
items: '', items: '',
discount: false, discount: false,
currency: null,
taxes: null, taxes: null,
} }
}, },
@ -102,21 +101,6 @@ const app = new Vue({
}); });
}, },
onChangeCurrency(currency_code) {
axios.get(url + '/settings/currencies/currency', {
params: {
code: currency_code
}
})
.then(response => {
this.currency = response.data;
this.form.currency_code = response.data.code;
this.form.currency_rate = response.data.rate;
})
.catch(error => {
});
},
onCalculateTotal() { onCalculateTotal() {
let sub_total = 0; let sub_total = 0;
let discount_total = 0; let discount_total = 0;

View File

@ -29,12 +29,6 @@ const app = new Vue({
return { return {
form: new Form('payment'), form: new Form('payment'),
bulk_action: new BulkAction('payments'), bulk_action: new BulkAction('payments'),
currency: null,
} }
}, },
methods: {
onCalcualte() {
}
}
}); });

View File

@ -49,7 +49,6 @@ const app = new Vue({
transaction: [], transaction: [],
items: '', items: '',
discount: false, discount: false,
currency: null,
taxes: null, taxes: null,
} }
}, },
@ -102,22 +101,6 @@ const app = new Vue({
}); });
}, },
onChangeCurrency(currency_code) {
axios.get(url + '/settings/currencies/currency', {
params: {
code: currency_code
}
})
.then(response => {
this.currency = response.data;
this.form.currency_code = response.data.code;
this.form.currency_rate = response.data.rate;
})
.catch(error => {
});
},
onCalculateTotal() { onCalculateTotal() {
let sub_total = 0; let sub_total = 0;
let discount_total = 0; let discount_total = 0;

View File

@ -103,7 +103,7 @@
<tr class="row"> <tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th> <th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block"> <td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="closing-balance-total" v-if="totals.closing_balance" v-html="totals.closing_balance"></span> <span id="closing-balance-total" v-if="totals.closing_balance" v-html="totals.closing_balance"></span>
<span v-else>@money(0, $account->currency_code, true)</span> <span v-else>@money(0, $account->currency_code, true)</span>
</td> </td>
@ -111,7 +111,7 @@
<tr class="row"> <tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th> <th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th>
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block"> <td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="cleared-amount-total" v-if="totals.cleared_amount" v-html="totals.cleared_amount"></span> <span id="cleared-amount-total" v-if="totals.cleared_amount" v-html="totals.cleared_amount"></span>
<span v-else>@money(0, $account->currency_code, true)</span> <span v-else>@money(0, $account->currency_code, true)</span>
</td> </td>
@ -119,7 +119,7 @@
<tr :class="difference" class="row"> <tr :class="difference" class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th> <th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th>
<td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block"> <td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.difference', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.difference', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="difference-total" v-if="totals.difference" v-html="totals.difference"></span> <span id="difference-total" v-if="totals.difference" v-html="totals.difference"></span>
<span v-else>@money(0, $account->currency_code, true)</span> <span v-else>@money(0, $account->currency_code, true)</span>
</td> </td>

View File

@ -75,7 +75,7 @@
<tr class="row"> <tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th> <th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.closing_balance') }}:</th>
<td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block"> <td id="closing-balance" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], $reconciliation->closing_balance, 'text-right d-none') }} {{ Form::moneyGroup('closing_balance_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.closing_balance', 'currency' => $currency, 'masked' => 'true'], $reconciliation->closing_balance, 'text-right d-none') }}
<span id="closing-balance-total" v-if="totals.closing_balance" v-html="totals.closing_balance"></span> <span id="closing-balance-total" v-if="totals.closing_balance" v-html="totals.closing_balance"></span>
<span v-else>@money($reconciliation->closing_balance, $account->currency_code, true)</span> <span v-else>@money($reconciliation->closing_balance, $account->currency_code, true)</span>
</td> </td>
@ -83,7 +83,7 @@
<tr class="row"> <tr class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th> <th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('reconciliations.cleared_amount') }}:</th>
<td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block"> <td id="cleared-amount" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('cleared_amount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.cleared_amount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="cleared-amount-total" v-if="totals.cleared_amount" v-html="totals.cleared_amount"></span> <span id="cleared-amount-total" v-if="totals.cleared_amount" v-html="totals.cleared_amount"></span>
<span v-else>@money(0, $account->currency_code, true)</span> <span v-else>@money(0, $account->currency_code, true)</span>
</td> </td>
@ -91,7 +91,7 @@
<tr :class="difference" class="row"> <tr :class="difference" class="row">
<th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th> <th class="col-md-9 col-lg-11 text-right d-none d-md-block">{{ trans('general.difference') }}:</th>
<td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block"> <td id="difference" class="col-md-3 col-lg-1 text-right d-none d-md-block">
{{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.difference', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('difference_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.difference', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="difference-total" v-if="totals.difference" v-html="totals.difference"></span> <span id="difference-total" v-if="totals.difference" v-html="totals.difference"></span>
<span v-else>@money(0, $account->currency_code, true)</span> <span v-else>@money(0, $account->currency_code, true)</span>
</td> </td>

View File

@ -1,6 +1,12 @@
@stack($name . '_input_start') @stack($name . '_input_start')
<akaunting-money :col="'{{ $col }}'" <akaunting-money :col="'{{ $col }}'"
@if (!empty($attributes['v-error']))
:form-classes="[{'has-error': {{ $attributes['v-error'] }} }]"
@else
:form-classes="[{'has-error': form.errors.has('{{ $name }}') }]"
@endif
@if (isset($attributes['required'])) @if (isset($attributes['required']))
:required="{{ ($attributes['required']) ? 'true' : 'false' }}" :required="{{ ($attributes['required']) ? 'true' : 'false' }}"
@endif @endif
@ -10,7 +16,7 @@
@endif @endif
@if (isset($attributes['disabled'])) @if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}" :disabled="'{{ $attributes['disabled'] }}'"
@endif @endif
@if (isset($attributes['masked'])) @if (isset($attributes['masked']))
@ -27,6 +33,8 @@
@if (!empty($attributes['dynamic-currency'])) @if (!empty($attributes['dynamic-currency']))
:dynamic-currency="{{ $attributes['dynamic-currency'] }}" :dynamic-currency="{{ $attributes['dynamic-currency'] }}"
@else
:dynamic-currency="currency"
@endif @endif
@if (!empty($attributes['v-model'])) @if (!empty($attributes['v-model']))
@ -44,6 +52,12 @@
@else @else
@interface="form.{{ $name }} = $event" @interface="form.{{ $name }} = $event"
@endif @endif
@if (isset($attributes['v-error-message']))
:form-error="{{ $attributes['v-error-message'] }}"
@else
:form-error="form.errors.get('{{ $name }}')"
@endif
></akaunting-money> ></akaunting-money>
@stack($name . '_input_end') @stack($name . '_input_end')

View File

@ -79,7 +79,7 @@
<strong>{{ trans('bills.sub_total') }}</strong> <strong>{{ trans('bills.sub_total') }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span> <span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -130,7 +130,7 @@
</el-popover> </el-popover>
</td> </td>
<td class="text-right border-bottom-0"> <td class="text-right border-bottom-0">
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span> <span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!} {!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
@ -144,7 +144,7 @@
<strong>{{ trans_choice('general.taxes', 1) }}</strong> <strong>{{ trans_choice('general.taxes', 1) }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span> <span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -157,7 +157,7 @@
<strong>{{ trans('bills.total') }}</strong> <strong>{{ trans('bills.total') }}</strong>
</td> </td>
<td class="text-right long-texts"> <td class="text-right long-texts">
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="grand-total" v-if="totals.total" v-html="totals.total"></span> <span id="grand-total" v-if="totals.total" v-html="totals.total"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>

View File

@ -80,7 +80,7 @@
<strong>{{ trans('bills.sub_total') }}</strong> <strong>{{ trans('bills.sub_total') }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span> <span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -131,7 +131,7 @@
</el-popover> </el-popover>
</td> </td>
<td class="text-right border-bottom-0"> <td class="text-right border-bottom-0">
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span> <span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!} {!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
@ -145,7 +145,7 @@
<strong>{{ trans_choice('general.taxes', 1) }}</strong> <strong>{{ trans_choice('general.taxes', 1) }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span> <span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -158,7 +158,7 @@
<strong>{{ trans('bills.total') }}</strong> <strong>{{ trans('bills.total') }}</strong>
</td> </td>
<td class="text-right long-texts"> <td class="text-right long-texts">
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="grand-total" v-if="totals.total" v-html="totals.total"></span> <span id="grand-total" v-if="totals.total" v-html="totals.total"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>

View File

@ -69,7 +69,7 @@
@stack('price_td_start') @stack('price_td_start')
<td class="border-right-0 border-bottom-0 pb-0"> <td class="border-right-0 border-bottom-0 pb-0">
@stack('price_input_start') @stack('price_input_start')
{{ Form::moneyGroup('name', '', '', ['required' => 'required', 'v-model' => 'row.price', 'data-item' => 'price', 'currency' => $currency, 'dynamic-currency' => 'currency', 'change' => 'row.price = $event; onCalculateTotal'], 0.00, 'text-right input-price') }} {{ Form::moneyGroup('name', '', '', ['required' => 'required', 'v-model' => 'row.price', 'data-item' => 'price', 'currency' => $currency, 'change' => 'row.price = $event; onCalculateTotal'], 0.00, 'text-right input-price') }}
<input name="items[][currency]" <input name="items[][currency]"
data-item="currency" data-item="currency"
v-model="row.currency" v-model="row.currency"

View File

@ -22,7 +22,7 @@
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!} {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
{!! Form::hidden('currency_rate', '1', ['id' => 'currency_rate']) !!} {!! Form::hidden('currency_rate', '1', ['id' => 'currency_rate']) !!}
{{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00) }} {{ Form::moneyGroup('amount', trans('general.amount'), 'money-bill-alt', ['required' => 'required', 'currency' => $currency], 0.00) }}
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }} {{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('default.account'), ['required' => 'required', 'change' => 'onChangeAccount']) }}

View File

@ -79,7 +79,7 @@
<strong>{{ trans('invoices.sub_total') }}</strong> <strong>{{ trans('invoices.sub_total') }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span> <span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -130,7 +130,7 @@
</el-popover> </el-popover>
</td> </td>
<td class="text-right border-bottom-0"> <td class="text-right border-bottom-0">
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span> <span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!} {!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
@ -144,7 +144,7 @@
<strong>{{ trans_choice('general.taxes', 1) }}</strong> <strong>{{ trans_choice('general.taxes', 1) }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span> <span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -157,7 +157,7 @@
<strong>{{ trans('invoices.total') }}</strong> <strong>{{ trans('invoices.total') }}</strong>
</td> </td>
<td class="text-right long-texts"> <td class="text-right long-texts">
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="grand-total" v-if="totals.total" v-html="totals.total"></span> <span id="grand-total" v-if="totals.total" v-html="totals.total"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>

View File

@ -80,7 +80,7 @@
<strong>{{ trans('invoices.sub_total') }}</strong> <strong>{{ trans('invoices.sub_total') }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('sub_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span> <span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -131,7 +131,7 @@
</el-popover> </el-popover>
</td> </td>
<td class="text-right border-bottom-0"> <td class="text-right border-bottom-0">
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('discount_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span> <span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
{!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!} {!! Form::hidden('discount', null, ['id' => 'discount', 'class' => 'form-control text-right', 'v-model' => 'form.discount']) !!}
@ -145,7 +145,7 @@
<strong>{{ trans_choice('general.taxes', 1) }}</strong> <strong>{{ trans_choice('general.taxes', 1) }}</strong>
</td> </td>
<td class="text-right border-bottom-0 long-texts"> <td class="text-right border-bottom-0 long-texts">
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('tax_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span> <span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>
@ -158,7 +158,7 @@
<strong>{{ trans('invoices.total') }}</strong> <strong>{{ trans('invoices.total') }}</strong>
</td> </td>
<td class="text-right long-texts"> <td class="text-right long-texts">
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }} {{ Form::moneyGroup('grand_total', '', '', ['disabled' => true, 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="grand-total" v-if="totals.total" v-html="totals.total"></span> <span id="grand-total" v-if="totals.total" v-html="totals.total"></span>
<span v-else>@money(0, $currency->code, true)</span> <span v-else>@money(0, $currency->code, true)</span>
</td> </td>

View File

@ -69,7 +69,7 @@
@stack('price_td_start') @stack('price_td_start')
<td class="border-right-0 border-bottom-0 pb-0"> <td class="border-right-0 border-bottom-0 pb-0">
@stack('price_input_start') @stack('price_input_start')
{{ Form::moneyGroup('name', '', '', ['required' => 'required', 'v-model' => 'row.price', 'data-item' => 'price', 'currency' => $currency, 'dynamic-currency' => 'currency', 'change' => 'row.price = $event; onCalculateTotal'], 0.00, 'text-right input-price') }} {{ Form::moneyGroup('name', '', '', ['required' => 'required', 'v-model' => 'row.price', 'data-item' => 'price', 'currency' => $currency, 'change' => 'row.price = $event; onCalculateTotal'], 0.00, 'text-right input-price') }}
<input name="items[][currency]" <input name="items[][currency]"
data-item="currency" data-item="currency"
v-model="row.currency" v-model="row.currency"