Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
brkcvn committed Jun 2, 2021
1 parent 3dfb9c2 commit bdbca0f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 36 deletions.
28 changes: 1 addition & 27 deletions public/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -1627,30 +1627,4 @@ table .align-items-center td span.badge {
.form-group .el-select .el-select__tags > span {
display: contents !important;
}
/* Select Tag Fixed Content Finish */

.row-tax-clear {
max-width: 40px !important;
}

.row-tax-value {
width: 243px !important;
}

.row-tax-input {
width: 244px !important;
}

@media (max-width: 1300px) {
.row-tax-clear {
max-width: 40px !important;
}

.row-tax-value {
width: 233px !important;
}

.row-tax-input {
width: 234px !important;
}
}
/* Select Tag Fixed Content Finish */
31 changes: 22 additions & 9 deletions resources/views/components/documents/form/line-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,19 @@ class="form-control text-center p-0"

<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']))
Expand Down Expand Up @@ -166,7 +179,7 @@ class="form-control text-center p-0"
<tr v-if="row.add_discount">
<td colspan="2" class="pl-0 pb-0 border-0" :class="{'pb-2' : !row.add_tax}">
<div>
<div style="float: left; margin-top: 15px; margin-left: -65px;">
<div style="float: left; margin-top: 15px; margin-left: -65px">
{{ trans('invoices.discount') }}
</div>

Expand Down Expand Up @@ -216,9 +229,9 @@ class="form-control text-center"

<tr v-for="(row_tax, row_tax_index) in row.tax_ids"
:index="row_tax_index">
<td class="pl-0 pb-0 border-0 row-tax-input" :class="{'pb-2' : !row.add_tax}" style="width: 244px;">
<td colspan="2" class="pl-0 pb-0 border-0 row-tax-input" :class="{'pb-2' : !row.add_tax}">
<div>
<div style="float: left; margin-top: 15px; margin-right:2px">
<div style="float: left; margin-top: 15px; margin-right:2px; position:absolute; margin-left:-35px;">
{{ trans_choice('general.taxes', 1) }}
</div>

Expand All @@ -244,23 +257,23 @@ class="mb-0 select-tax"
</div>
</td>

<td :class="{'pb-2' : !row.add_tax}" class="border-0 pb-0 text-right long-texts row-tax-value" style="width: 243px;">
<td :class="{'pb-2' : !row.add_tax}" class="border-0 pb-0 text-right long-texts">
<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 row-tax-clear" :class="{'pb-2' : !row.add_tax}" style="max-width: 40px;">
<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>
</td>
</tr>

<tr v-if="row.add_tax">
<td class="pl-0 border-0 row-tax-input" style="width: 234px;">
<div>
<div style="float: left; margin-top: 15px; margin-right:2px;">
<td colspan="2" class="pl-0 border-0 row-tax-input">
<div style="position: relative;">
<div style="float: left; margin-top: 15px; margin-right:2px; position: absolute; margin-left: -35px;">
{{ trans_choice('general.taxes', 1) }}
</div>

Expand Down Expand Up @@ -308,7 +321,7 @@ class="mb-0 select-tax"
</div>
</td>

<td class="border-0 text-right long-texts align-middle row-tax-value" style="width: 233px;">
<td class="border-0 text-right long-texts align-middle row-tax-value">
<div>
__
</div>
Expand Down

0 comments on commit bdbca0f

Please sign in to comment.