discount
This commit is contained in:
@ -76,6 +76,15 @@
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('invoices.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="vertical-align: middle;" colspan="5"><strong>{{ trans('invoices.discount') }}</strong></td>
|
||||
<td class="text-right">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-percent"></i></div>
|
||||
{!! Form::number('discount', null, ['class' => 'form-control text-right']) !!}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
@ -256,7 +265,7 @@
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
|
@ -91,6 +91,15 @@
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('invoices.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" style="vertical-align: middle;" colspan="5"><strong>{{ trans('invoices.discount') }}</strong></td>
|
||||
<td class="text-right">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-percent"></i></div>
|
||||
{!! Form::number('discount', $invoice->discount, ['class' => 'form-control text-right']) !!}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
@ -299,7 +308,7 @@
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
|
@ -114,17 +114,10 @@
|
||||
<tbody>
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code != 'total')
|
||||
@if (($total->code == 'tax') && isset($taxes[$total->name]))
|
||||
<tr>
|
||||
<th>{{ $taxes[$total->name] }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr class="text-success">
|
||||
|
@ -121,17 +121,10 @@
|
||||
<tbody>
|
||||
@foreach ($invoice->totals as $total)
|
||||
@if ($total->code != 'total')
|
||||
@if (($total->code == 'tax') && isset($taxes[$total->name]))
|
||||
<tr>
|
||||
<th>{{ $taxes[$total->name] }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
@if ($invoice->paid)
|
||||
<tr class="text-success">
|
||||
|
Reference in New Issue
Block a user