Adding discount as an amount #kbcqjv
This commit is contained in:
@ -163,12 +163,12 @@
|
||||
<div class="form-group mb-0 w-100" style="display: inline-block; position: relative;">
|
||||
<div class="input-group mb-0 select-tax">
|
||||
<div class="input-group-prepend">
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'percentage'}, {'btn-primary' : row.discount_type === 'percentage'}]"
|
||||
@click="onChangeLineDiscountType(index, 'percentage')" type="button">
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'normal'}, {'btn-primary' : row.discount_type === 'normal'}]"
|
||||
@click="onChangeLineDiscountType(index, 'normal')" type="button">
|
||||
<i class="fa fa-percent fa-sm"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'amount'}, {'btn-primary' : row.discount_type === 'amount'}]"
|
||||
@click="onChangeLineDiscountType(index, 'amount')" type="button">{{ $currency->symbol }}
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : row.discount_type !== 'fixed'}, {'btn-primary' : row.discount_type === 'fixed'}]"
|
||||
@click="onChangeLineDiscountType(index, 'fixed')" type="button">{{ $currency->symbol }}
|
||||
</button>
|
||||
</div>
|
||||
<input type="number"
|
||||
|
@ -57,12 +57,12 @@
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'percentage'}, {'btn-primary' : form.discount_type === 'percentage'}]"
|
||||
@click="onChangeDiscountType('percentage')" type="button">
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'normal'}, {'btn-primary' : form.discount_type === 'normal'}]"
|
||||
@click="onChangeDiscountType('normal')" type="button">
|
||||
<i class="fa fa-percent fa-sm"></i>
|
||||
</button>
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'amount'}, {'btn-primary' : form.discount_type === 'amount'}]"
|
||||
@click="onChangeDiscountType('amount')" type="button">{{ $currency->symbol }}
|
||||
<button class="btn btn-sm" :class="[{'btn-outline-primary' : form.discount_type !== 'fixed'}, {'btn-primary' : form.discount_type === 'fixed'}]"
|
||||
@click="onChangeDiscountType('fixed')" type="button">{{ $currency->symbol }}
|
||||
</button>
|
||||
</div>
|
||||
{!! Form::number('pre_discount', null, ['id' => 'pre-discount', 'class' => 'form-control', 'v-model' => 'form.discount']) !!}
|
||||
|
@ -33,7 +33,11 @@
|
||||
@if (!$hideDiscount)
|
||||
@if (in_array(setting('localisation.discount_location', 'total'), ['item', 'both']))
|
||||
@stack('discount_td_start')
|
||||
<td class="discount">{{ $item->discount }}</td>
|
||||
@if ($item->discount_type === 'normal')
|
||||
<td class="discount">{{ $item->discount }}</td>
|
||||
@else
|
||||
<td class="discount">@money($item->discount, $document->currency_code, true)</td>
|
||||
@endif
|
||||
@stack('discount_td_end')
|
||||
@endif
|
||||
@endif
|
||||
|
Reference in New Issue
Block a user