discount
This commit is contained in:
@ -12,6 +12,7 @@ return [
|
||||
'quantity' => 'Quantity',
|
||||
'price' => 'Price',
|
||||
'sub_total' => 'Subtotal',
|
||||
'discount' => 'Discount',
|
||||
'tax_total' => 'Tax Total',
|
||||
'total' => 'Total',
|
||||
|
||||
|
@ -12,6 +12,7 @@ return [
|
||||
'quantity' => 'Quantity',
|
||||
'price' => 'Price',
|
||||
'sub_total' => 'Subtotal',
|
||||
'discount' => 'Discount',
|
||||
'tax_total' => 'Tax Total',
|
||||
'total' => 'Total',
|
||||
|
||||
|
@ -114,17 +114,10 @@
|
||||
<tbody>
|
||||
@foreach($bill->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, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
@if ($bill->paid)
|
||||
<tr class="text-success">
|
||||
|
@ -76,6 +76,15 @@
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.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('bills.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>
|
||||
@ -255,7 +264,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) {
|
||||
|
@ -92,6 +92,15 @@
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.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('bills.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', $bill->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>
|
||||
@ -300,7 +309,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) {
|
||||
|
@ -119,17 +119,10 @@
|
||||
<tbody>
|
||||
@foreach ($bill->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, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans($total->name) }}:</th>
|
||||
<td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@else
|
||||
@if ($bill->paid)
|
||||
<tr class="text-success">
|
||||
|
@ -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">
|
||||
|
8
resources/views/partials/form/number_group.blade.php
Normal file
8
resources/views/partials/form/number_group.blade.php
Normal file
@ -0,0 +1,8 @@
|
||||
<div class="form-group {{ $col }} {{ isset($attributes['required']) ? 'required' : '' }} {{ $errors->has($name) ? 'has-error' : '' }}">
|
||||
{!! Form::label($name, $text, ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-{{ $icon }}"></i></div>
|
||||
{!! Form::number($name, $value, array_merge(['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => $text])], $attributes)) !!}
|
||||
</div>
|
||||
{!! $errors->first($name, '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
Reference in New Issue
Block a user