Merge pull request #2078 from brkcvn/invoice-styling-bugfix

Invoice styling bugfix
This commit is contained in:
Cüneyt Şentürk 2021-06-04 10:32:55 +03:00 committed by GitHub
commit 12b8881a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 30 deletions

View File

@ -1631,4 +1631,4 @@ table .align-items-center td span.badge {
.form-group .el-select .el-select__tags > span {
display: contents !important;
}
/* Select Tag Fixed Content Finish */
/* Select Tag Fixed Content Finish */

View File

@ -136,25 +136,11 @@
<td class="border-top-0 p-0" colspan="4">
<table class="w-100">
<colgroup>
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<col style="width: 25%;">
<col style="width: 30%;">
<col style="width: 55%;">
<col style="width: 40px;">
@else
<col style="width: 10%;">
<col style="width: 10%;">
<col style="width: 42%;">
<col style="width: 40px;">
@endif
</colgroup>
<tbody>
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<tr v-if="!row.add_tax || !row.add_discount">
<td class="text-left border-0 p-0">
<td class="text-left border-0 p-0" style="display: block;">
<div>
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddLineDiscount(index)" v-if="!row.add_discount">
{{ trans('general.title.add', ['type' => trans('invoices.discount')]) }}
@ -162,8 +148,8 @@
</div>
</td>
<td class="text-right border-0 p-0 pr-4">
<div>
<td class="text-right border-0 p-0 pr-4" style="display: block;">
<div style="float:left;">
<button type="button" class="btn btn-link btn-sm p-0" @click="onAddTax(index)" v-if="!row.add_tax">
{{ trans('general.title.add', ['type' => trans_choice('general.taxes', 1)]) }}
</button>
@ -178,7 +164,7 @@
</tr>
<tr v-if="row.add_discount">
<td colspan="2" class="pl-0 pb-0 border-0" :class="{'pb-2' : !row.add_tax}">
<td colspan="2" class="pl-0 pb-0 border-0" :class="{'pb-2' : !row.add_tax}" style="width:42%;">
<div>
<div style="float: left; margin-top: 15px; margin-left: -65px;">
{{ trans('invoices.discount') }}
@ -214,7 +200,7 @@
</div>
</td>
<td class="border-0 pb-0 text-right long-texts" :class="{'pb-2' : !row.add_tax}">
<td class="border-0 pb-0 text-right long-texts" :class="{'pb-2' : !row.add_tax}" style="width:231px;">
<div>
{{ Form::moneyGroup('discount_amount', '', '', ['required' => 'required', 'disabled' => 'true' , 'row-input' => 'true', 'v-model' => 'row.discount_amount', 'data-item' => 'discount_amount', 'currency' => $currency, 'dynamic-currency' => 'currency'], 0.00, 'text-right input-price disabled-money') }}
</div>
@ -230,9 +216,9 @@
<tr v-for="(row_tax, row_tax_index) in row.tax_ids"
:index="row_tax_index">
<td class="pl-0 pb-0 border-0" :class="{'pb-2' : !row.add_tax}" style="width: 42%;">
<div>
<div style="float: left; margin-top: 15px; margin-right:2px">
<td colspan="2" class="pl-0 pb-0 border-0" :class="{'pb-2' : !row.add_tax}" style="width:42%;">
<div style="position: relative;">
<div style="float: left; margin-top: 15px; margin-right:2px; position: absolute; left: -33px;">
{{ trans_choice('general.taxes', 1) }}
</div>
@ -258,13 +244,13 @@
</div>
</td>
<td :class="{'pb-2' : !row.add_tax}" class="border-0 pb-0 text-right long-texts" style="width: 39%;">
<td :class="{'pb-2' : !row.add_tax}" class="border-0 pb-0 text-right long-texts" style="width:231px;">
<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') }}
</div>
</td>
<td class="pb-3 pl-2 align-bottom border-0" :class="{'pb-2' : !row.add_tax}" style="width:19%;" >
<td class="pb-3 pl-2 align-bottom border-0" :class="{'pb-2' : !row.add_tax}" style="max-width: 40px;" >
<button type="button" @click="onDeleteTax(index, row_tax_index)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i>
</button>
@ -272,9 +258,9 @@
</tr>
<tr v-if="row.add_tax">
<td class="pl-0 border-0" style="width:42%;">
<div>
<div style="float: left; margin-top: 15px; margin-right:2px;">
<td colspan="2" class="pl-0 border-0" style="width: 42%;">
<div style="position: relative;">
<div style="float: left; margin-top: 15px; margin-right:2px; position: absolute; left: -33px;" style="width:231px;">
{{ trans_choice('general.taxes', 1) }}
</div>
@ -322,13 +308,13 @@
</div>
</td>
<td class="border-0 text-right long-texts align-middle;" style="width:39%;">
<td class="border-0 text-right long-texts align-middle;" style="width:231px;">
<div>
__
</div>
</td>
<td class="pb-3 pl-2 align-bottom border-0" style="width:19%;" >
<td class="pb-3 pl-2 align-bottom border-0" style="max-width:40px;" >
@if (!$hideDiscount && in_array(setting('localisation.discount_location'), ['item', 'both']))
<button type="button" @click="onDeleteTax(index, 999)" class="btn btn-link btn-delete p-0">
<i class="far fa-trash-alt"></i>