document item line discount active then tax styling..
This commit is contained in:
parent
b86dadb278
commit
f753cfa077
10
resources/assets/js/views/common/documents.js
vendored
10
resources/assets/js/views/common/documents.js
vendored
@ -361,6 +361,12 @@ const app = new Vue({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onDeleteTax(item_index, tax_index) {
|
onDeleteTax(item_index, tax_index) {
|
||||||
|
if (tax_index == '999') {
|
||||||
|
this.items[item_index].add_tax = false;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.items[item_index].tax_ids.splice(tax_index, 1);
|
this.items[item_index].tax_ids.splice(tax_index, 1);
|
||||||
this.form.items[item_index].tax_ids.splice(tax_index, 1);
|
this.form.items[item_index].tax_ids.splice(tax_index, 1);
|
||||||
|
|
||||||
@ -542,9 +548,9 @@ const app = new Vue({
|
|||||||
description: item.description === null ? "" : item.description,
|
description: item.description === null ? "" : item.description,
|
||||||
quantity: item.quantity,
|
quantity: item.quantity,
|
||||||
price: (item.price).toFixed(2),
|
price: (item.price).toFixed(2),
|
||||||
add_tax: true,
|
add_tax: (!item_taxes.length && document.getElementById('invoice-item-discount-rows') != null) ? false : true,
|
||||||
tax_ids: item_taxes,
|
tax_ids: item_taxes,
|
||||||
add_discount: (item_taxes.length) ? true : false,
|
add_discount: (item.discount_rate) ? true : false,
|
||||||
discount: item.discount_rate,
|
discount: item.discount_rate,
|
||||||
total: (item.total).toFixed(2)
|
total: (item.total).toFixed(2)
|
||||||
});
|
});
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
|
|
||||||
@stack('add_item_td_start')
|
@stack('add_item_td_start')
|
||||||
<tr id="addItem">
|
<tr id="addItem">
|
||||||
<td class="text-right border-bottom-0 p-0" colspan="{{ 7 }}" :colspan="colspan">
|
<td class="text-right border-bottom-0 p-0" colspan="{{ 7 }}">
|
||||||
<x-select-item-button
|
<x-select-item-button
|
||||||
type="{{ $type }}"
|
type="{{ $type }}"
|
||||||
is-sale="{{ $isSalePrice }}"
|
is-sale="{{ $isSalePrice }}"
|
||||||
|
@ -195,7 +195,7 @@
|
|||||||
@stack('discount_input_end')
|
@stack('discount_input_end')
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="1" style="border: 0;" class="text-right total-column border-bottom-0 long-texts">
|
<td colspan="1" style="border: 0;" class="text-right long-texts">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('discount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'value' => 'row.discount', 'data-item' => 'discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
{{ Form::moneyGroup('discount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'value' => 'row.discount', 'data-item' => 'discount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
@ -206,14 +206,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@endif
|
||||||
|
|
||||||
<tr v-if="row.add_tax" v-for="(row_tax, row_tax_index) in row.tax_ids"
|
|
||||||
:index="row_tax_index">
|
|
||||||
@else
|
|
||||||
<tr v-for="(row_tax, row_tax_index) in row.tax_ids"
|
<tr v-for="(row_tax, row_tax_index) in row.tax_ids"
|
||||||
:index="row_tax_index">
|
:index="row_tax_index">
|
||||||
@endif
|
<td colspan="2" class="pb-0" :class="{'pb-2' : !row.add_tax}" style="border: 0; padding-right: 5px; padding-left: 5px;">
|
||||||
<td colspan="2" class="pb-0" style="border: 0; padding-right: 5px; padding-left: 5px;">
|
|
||||||
<div style="margin-left: -30px; margin-right: 35px;">
|
<div style="margin-left: -30px; margin-right: 35px;">
|
||||||
<span style="float: left; margin-right: 10px; margin-top: 15px;">{{ trans_choice('general.taxes', 1) }}</span>
|
<span style="float: left; margin-right: 10px; margin-top: 15px;">{{ trans_choice('general.taxes', 1) }}</span>
|
||||||
|
|
||||||
@ -238,12 +235,12 @@
|
|||||||
@stack('taxes_input_end')
|
@stack('taxes_input_end')
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="1" style="border: 0;" class="pb-0 text-right long-texts">
|
<td colspan="1" style="border: 0;" :class="{'pb-2' : !row.add_tax}" class="pb-0 text-right long-texts">
|
||||||
<div>
|
<div>
|
||||||
{{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
{{ Form::moneyGroup('tax', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row_tax.price', 'data-item' => 'total', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="1" style="border: 0;" class="pb-0 align-middle">
|
<td colspan="1" style="border: 0;" :class="{'pb-2' : !row.add_tax}" class="pb-0 align-middle">
|
||||||
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
|
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
|
||||||
<i class="far fa-trash-alt"></i>
|
<i class="far fa-trash-alt"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -253,7 +250,9 @@
|
|||||||
<tr v-if="row.add_tax">
|
<tr v-if="row.add_tax">
|
||||||
<td colspan="2" style="border: 0; padding-right: 5px; padding-left: 5px;">
|
<td colspan="2" style="border: 0; padding-right: 5px; padding-left: 5px;">
|
||||||
<div style="margin-left: -30px; margin-right:35px;">
|
<div style="margin-left: -30px; margin-right:35px;">
|
||||||
<span style="float: left; margin-right: 10px; margin-top: 15px;">{{ trans_choice('general.taxes', 1) }}</span>
|
<span style="float: left; margin-right: 10px; margin-top: 15px;">
|
||||||
|
{{ trans_choice('general.taxes', 1) }}
|
||||||
|
</span>
|
||||||
|
|
||||||
@stack('taxes_input_start')
|
@stack('taxes_input_start')
|
||||||
<akaunting-select
|
<akaunting-select
|
||||||
@ -304,7 +303,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td colspan="1" style="border: 0;">
|
<td colspan="1" style="border: 0;">
|
||||||
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
|
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
|
||||||
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
|
<button type="button" @click="onDeleteTax(index, 999)" class="btn btn-link btn-delete p-0">
|
||||||
<i class="far fa-trash-alt"></i>
|
<i class="far fa-trash-alt"></i>
|
||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user