Fixed document tax total calculate issue fixed
This commit is contained in:
parent
60cb7f1364
commit
267fa9c231
10
resources/assets/js/views/common/documents.js
vendored
10
resources/assets/js/views/common/documents.js
vendored
@ -265,7 +265,7 @@ const app = new Vue({
|
||||
|
||||
inclusive_tax_total += item.tax_ids[inclusive.tax_index].price;
|
||||
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, inclusive.tax_id, inclusive.tax_name, inclusive.tax_type, item.tax_ids[inclusive.tax_index].price);
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, inclusive.tax_id, inclusive.tax_name, item.tax_ids[inclusive.tax_index].price);
|
||||
}, this);
|
||||
|
||||
item.total = parseFloat(item.grand_total - inclusive_tax_total);
|
||||
@ -277,7 +277,7 @@ const app = new Vue({
|
||||
|
||||
total_tax_amount += item.tax_ids[fixed.tax_index].price;
|
||||
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, fixed.tax_id, fixed.tax_name, fixed.tax_type, item.tax_ids[fixed.tax_index].price);
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, fixed.tax_id, fixed.tax_name, item.tax_ids[fixed.tax_index].price);
|
||||
}, this);
|
||||
}
|
||||
|
||||
@ -293,7 +293,7 @@ const app = new Vue({
|
||||
|
||||
total_tax_amount += item.tax_ids[normal.tax_index].price;
|
||||
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, normal.tax_id, normal.tax_name, normal.tax_type, item.tax_ids[normal.tax_index].price);
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, normal.tax_id, normal.tax_name, item.tax_ids[normal.tax_index].price);
|
||||
}, this);
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ const app = new Vue({
|
||||
|
||||
total_tax_amount += item.tax_ids[withholding.tax_index].price;
|
||||
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, withholding.tax_id, withholding.tax_name, withholding.tax_type, item.tax_ids[withholding.tax_index].price);
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, withholding.tax_id, withholding.tax_name, item.tax_ids[withholding.tax_index].price);
|
||||
}, this);
|
||||
}
|
||||
|
||||
@ -313,7 +313,7 @@ const app = new Vue({
|
||||
compounds.forEach(function(compound) {
|
||||
item.tax_ids[compound.tax_index].price = (item.grand_total / 100) * compound.tax_rate;
|
||||
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, compound.tax_id, compound.tax_name, compound.tax_type, item.tax_ids[compound.tax_index].price);
|
||||
totals_taxes = this.calculateTotalsTax(totals_taxes, compound.tax_id, compound.tax_name, item.tax_ids[compound.tax_index].price);
|
||||
|
||||
item.grand_total += item.tax_ids[compound.tax_index].price;
|
||||
}, this);
|
||||
|
@ -295,6 +295,27 @@
|
||||
:dynamic-options="dynamic_taxes"
|
||||
:disabled-options="form.items[index].tax_ids"
|
||||
:value="row_tax.id"
|
||||
:add-new="{{ json_encode([
|
||||
'status' => true,
|
||||
'text' => trans('general.title.new', ['type' => trans_choice('general.taxes', 1)]),
|
||||
'path' => route('modals.taxes.create'),
|
||||
'type' => 'modal',
|
||||
'field' => [
|
||||
'key' => 'id',
|
||||
'value' => 'title'
|
||||
],
|
||||
'new_text' => trans('modules.new'),
|
||||
'buttons' => [
|
||||
'cancel' => [
|
||||
'text' => trans('general.cancel'),
|
||||
'class' => 'btn-outline-secondary'
|
||||
],
|
||||
'confirm' => [
|
||||
'text' => trans('general.save'),
|
||||
'class' => 'disabled:bg-green-100'
|
||||
]
|
||||
]
|
||||
])}}"
|
||||
@interface="row_tax.id = $event"
|
||||
@change="onCalculateTotal()"
|
||||
@new="dynamic_taxes.push($event)"
|
||||
|
@ -182,6 +182,13 @@
|
||||
selected="{{ $currency->code }}"
|
||||
change="onChangeCurrency"
|
||||
model="form.currency_code"
|
||||
add-new
|
||||
add-new-text="{!! trans('general.title.new', ['type' => trans_choice('general.currencies', 1)]) !!}"
|
||||
:path="route('modals.currencies.create')"
|
||||
:field="[
|
||||
'key' => 'code',
|
||||
'value' => 'name'
|
||||
]"
|
||||
form-group-class="h-8 -mt-2"
|
||||
/>
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
||||
@if (! empty($addNew))
|
||||
:add-new="{{ json_encode([
|
||||
'status' => true,
|
||||
'text' => trans('general.title.new', ['type' => $label ?? '']),
|
||||
'text' => isset($attributes['add-new-text']) ? $attributes['add-new-text'] : trans('general.title.new', ['type' => $label ?? '']),
|
||||
'path' => isset($attributes['path']) ? $attributes['path']: false,
|
||||
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
|
||||
'field' => [
|
||||
|
Loading…
x
Reference in New Issue
Block a user