add some feature..
This commit is contained in:
parent
825b43d32c
commit
3cc602fd35
37
public/css/custom.css
vendored
37
public/css/custom.css
vendored
@ -856,6 +856,14 @@ table .align-items-center td span.badge {
|
|||||||
/*-- Embed accordion textarea Start--*/
|
/*-- Embed accordion textarea Start--*/
|
||||||
.embed-card-body-footer {
|
.embed-card-body-footer {
|
||||||
margin-bottom: -1.5rem;
|
margin-bottom: -1.5rem;
|
||||||
|
border-top: 1px solid #e9ecef;
|
||||||
|
margin-left: -25px;
|
||||||
|
margin-right: -25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.embed-acoordion-textarea .form-control-label {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.embed-acoordion-textarea {
|
.embed-acoordion-textarea {
|
||||||
@ -1005,6 +1013,10 @@ table .align-items-center td span.badge {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aka-box:hover {
|
||||||
|
background-color: #f6f9fc;
|
||||||
|
}
|
||||||
|
|
||||||
.aka-box-content>:last-child {
|
.aka-box-content>:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@ -1209,17 +1221,31 @@ table .align-items-center td span.badge {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aka-select-menu-option:hover {
|
||||||
|
background-color: #F5F7FA;
|
||||||
|
}
|
||||||
|
|
||||||
.text-strong {
|
.text-strong {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.aka-select-footer {
|
.aka-select-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-top: 1px solid #b2c2cd;
|
border-top: 1px solid #dee2e6;
|
||||||
padding: 8px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #55588b;
|
color: #3c3f72;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
margin-top: 6px;
|
||||||
|
border-bottom-left-radius: 4px;
|
||||||
|
border-bottom-right-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aka-select-footer:hover {
|
||||||
|
background-color: #3c3f72 !important;
|
||||||
|
color: white !important;
|
||||||
|
border-top-color: #3c3f72;
|
||||||
}
|
}
|
||||||
|
|
||||||
.document-item-table>.aka-table>.aka-table-body>.aka-table-row:last-child .btn-aka-link {
|
.document-item-table>.aka-table>.aka-table-body>.aka-table-row:last-child .btn-aka-link {
|
||||||
@ -1358,6 +1384,11 @@ table .align-items-center td span.badge {
|
|||||||
|
|
||||||
.item-select .v-money.text-right.disabled-money {
|
.item-select .v-money.text-right.disabled-money {
|
||||||
color: #8898aa;
|
color: #8898aa;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-select .v-money.text-right.disabled-money:hover {
|
||||||
|
background-color: #F5F7FA !important;
|
||||||
}
|
}
|
||||||
/* Akaunting Item Button Finish */
|
/* Akaunting Item Button Finish */
|
||||||
|
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
{{ conversion }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'akaunting-currency-conversion',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
currencyConversionText: {
|
||||||
|
type: String,
|
||||||
|
default: 'Currency conversion'
|
||||||
|
},
|
||||||
|
price: {
|
||||||
|
type: String,
|
||||||
|
default: 'sale'
|
||||||
|
},
|
||||||
|
currecyCode: {
|
||||||
|
type: String,
|
||||||
|
default: 'USD'
|
||||||
|
},
|
||||||
|
currencyRate: {
|
||||||
|
default: 1.000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
conversion: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace(':currency_rate', this.currencyRate);
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
currencyConversionText: function (text) {
|
||||||
|
this.conversion = text.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace('', this.currencyRate);
|
||||||
|
},
|
||||||
|
|
||||||
|
price: function (price) {
|
||||||
|
this.conversion = this.currencyConversionText.replace(':price', price).replace(':currency_code', this.currecyCode).replace(':currency_rate', this.currencyRate);
|
||||||
|
},
|
||||||
|
|
||||||
|
currecyCode: function (currecyCode) {
|
||||||
|
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', currecyCode).replace(':currency_rate', this.currencyRate);
|
||||||
|
},
|
||||||
|
|
||||||
|
currencyRate: function (currencyRate) {
|
||||||
|
this.conversion = this.currencyConversionText.replace(':price', this.price).replace(':currency_code', this.currecyCode).replace(':currency_rate', currencyRate);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -45,6 +45,7 @@
|
|||||||
:value="item.price"
|
:value="item.price"
|
||||||
v-bind="money"
|
v-bind="money"
|
||||||
masked
|
masked
|
||||||
|
disabled
|
||||||
class="text-right disabled-money"
|
class="text-right disabled-money"
|
||||||
></money>
|
></money>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<money :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control"></money>
|
<money :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control" :class="moneyClass"></money>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="invalid-feedback d-block" v-if="error" v-html="error"></div>
|
<div class="invalid-feedback d-block" v-if="error" v-html="error"></div>
|
||||||
@ -27,14 +27,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<money :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control"></money>
|
<money :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control" :class="moneyClass"></money>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<money v-else :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control"></money>
|
<money v-else :name="name" @input="input" :placeholder="placeholder" v-bind="money" :value="model" :disabled="disabled" :masked="masked" class="form-control" :class="moneyClass"></money>
|
||||||
|
|
||||||
<div class="invalid-feedback d-block" v-if="error" v-html="error"></div>
|
<div class="invalid-feedback d-block" v-if="error" v-html="error"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -68,6 +67,11 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
description: "Prepend icon (left)"
|
description: "Prepend icon (left)"
|
||||||
},
|
},
|
||||||
|
moneyClass: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
description: "Selectbox disabled status"
|
||||||
|
},
|
||||||
group_class: {
|
group_class: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
|
2
resources/assets/js/mixins/global.js
vendored
2
resources/assets/js/mixins/global.js
vendored
@ -18,6 +18,7 @@ import AkauntingDate from './../components/AkauntingDate';
|
|||||||
import AkauntingRecurring from './../components/AkauntingRecurring';
|
import AkauntingRecurring from './../components/AkauntingRecurring';
|
||||||
import AkauntingHtmlEditor from './../components/AkauntingHtmlEditor';
|
import AkauntingHtmlEditor from './../components/AkauntingHtmlEditor';
|
||||||
import AkauntingCountdown from './../components/AkauntingCountdown';
|
import AkauntingCountdown from './../components/AkauntingCountdown';
|
||||||
|
import AkauntingCurrencyConversion from './../components/AkauntingCurrencyConversion';
|
||||||
|
|
||||||
import NProgress from 'nprogress';
|
import NProgress from 'nprogress';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
@ -46,6 +47,7 @@ export default {
|
|||||||
AkauntingRecurring,
|
AkauntingRecurring,
|
||||||
AkauntingHtmlEditor,
|
AkauntingHtmlEditor,
|
||||||
AkauntingCountdown,
|
AkauntingCountdown,
|
||||||
|
AkauntingCurrencyConversion,
|
||||||
[Select.name]: Select,
|
[Select.name]: Select,
|
||||||
[Option.name]: Option,
|
[Option.name]: Option,
|
||||||
[Steps.name]: Steps,
|
[Steps.name]: Steps,
|
||||||
|
@ -8,6 +8,7 @@ return [
|
|||||||
'decimal_mark' => 'Decimal Mark',
|
'decimal_mark' => 'Decimal Mark',
|
||||||
'thousands_separator' => 'Thousands Separator',
|
'thousands_separator' => 'Thousands Separator',
|
||||||
'precision' => 'Precision',
|
'precision' => 'Precision',
|
||||||
|
'conversion' => 'Currency conversion: :price (:currency_code) at :currency_rate',
|
||||||
'symbol' => [
|
'symbol' => [
|
||||||
'symbol' => 'Symbol',
|
'symbol' => 'Symbol',
|
||||||
'position' => 'Symbol Position',
|
'position' => 'Symbol Position',
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right border-bottom-0 long-texts pb-0">
|
<td class="text-right border-bottom-0 long-texts pb-0">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="border-bottom-0 pb-0"></td>
|
<td class="border-bottom-0 pb-0"></td>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0">
|
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('item_discount', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.item_discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
{{ Form::moneyGroup('item_discount', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.item_discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="border-top-0 pb-0"></td>
|
<td class="border-top-0 pb-0"></td>
|
||||||
@ -88,7 +88,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right border-top-0 border-bottom-0 pb-0">
|
<td class="text-right border-top-0 border-bottom-0 pb-0">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
{!! 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']) !!}
|
||||||
</td>
|
</td>
|
||||||
@ -106,7 +106,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0">
|
<td class="text-right border-top-0 border-bottom-0 long-texts pb-0">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'tax.total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'tax.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="border-top-0 pb-0"></td>
|
<td class="border-top-0 pb-0"></td>
|
||||||
@ -122,12 +122,27 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right border-top-0 long-texts pb-0">
|
<td class="text-right border-top-0 long-texts pb-0">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right disabled-money') }}
|
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'money-class' => 'text-right disabled-money'], 0.00, 'text-right disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="border-top-0"></td>
|
<td class="border-top-0"></td>
|
||||||
</tr>
|
</tr>
|
||||||
@stack('grand_total_td_end')
|
@stack('grand_total_td_end')
|
||||||
|
|
||||||
|
@stack('currency_conversion_td_start')
|
||||||
|
<tr id="tr-currency-conversion" class="d-none" :class="[{'d-table-row': (('{{ setting('default.currency') }}' != form.currency_code) && totals.total)}]">
|
||||||
|
<td class="border-top-0 pb-0"></td>
|
||||||
|
<td class="text-right border-top-0 border-right-0 align-middle pb-0" colspan="2">
|
||||||
|
<akaunting-currency-conversion
|
||||||
|
currency-conversion-text="{{ trans('currencies.conversion') }}"
|
||||||
|
:price="(totals.total / form.currency_rate).toFixed(2)"
|
||||||
|
currecy-code="{{ setting('default.currency') }}"
|
||||||
|
:currency-rate="form.currency_rate"
|
||||||
|
></akaunting-currency-conversion>
|
||||||
|
</td>
|
||||||
|
<td class="border-top-0"></td>
|
||||||
|
</tr>
|
||||||
|
@stack('currency_conversion_td_end')
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var document_items = {!! $document_items !!};
|
var document_items = {!! $document_items !!};
|
||||||
|
var document_default_currency = '{{ setting('default.currency') }}';
|
||||||
var document_currencies = {!! $currencies !!};
|
var document_currencies = {!! $currencies !!};
|
||||||
var document_taxes = {!! $taxes !!};
|
var document_taxes = {!! $taxes !!};
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
:form-classes="[{'has-error': form.errors.has('{{ $name }}') }]"
|
:form-classes="[{'has-error': form.errors.has('{{ $name }}') }]"
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (!empty($attributes['money-class']))
|
||||||
|
money-class="{{ $attributes['money-class'] }}"
|
||||||
|
@endif
|
||||||
|
|
||||||
@if (isset($attributes['required']))
|
@if (isset($attributes['required']))
|
||||||
:required="{{ ($attributes['required']) ? 'true' : 'false' }}"
|
:required="{{ ($attributes['required']) ? 'true' : 'false' }}"
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user