Skip to content

Commit

Permalink
items updated to flexible structure
Browse files Browse the repository at this point in the history
  • Loading branch information
batuhawk committed Feb 26, 2020
1 parent cd649a4 commit 6cbf8ed
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 102 deletions.
5 changes: 5 additions & 0 deletions public/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ button:focus
{
padding-top: 1.75rem !important;
}

.item-total
{
width: 15%;
}
/*--------Invoice and Bill Total Column Finish--------*/

/*--------Custom Table--------*/
Expand Down
44 changes: 22 additions & 22 deletions resources/views/purchases/bills/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,51 +34,51 @@
<div class="table-responsive overflow-x-scroll overflow-y-hidden ">
<table class="table table-bordered" id="items">
<thead class="thead-light">
<tr class="row">
<tr>
@stack('actions_th_start')
<th class="col-sm-1 text-center border-right-0 border-bottom-0 px-0">{{ trans('general.actions') }}</th>
<th class="text-center border-right-0 border-bottom-0">{{ trans('general.actions') }}</th>
@stack('actions_th_end')

@stack('name_th_start')
<th class="col-sm-3 text-left border-right-0 border-bottom-0">{{ trans('general.name') }}</th>
<th class="text-left border-right-0 border-bottom-0">{{ trans('general.name') }}</th>
@stack('name_th_end')

@stack('quantity_th_start')
<th class="col-sm-1 text-center border-right-0 border-bottom-0 px-0">{{ trans('bills.quantity') }}</th>
<th class="text-center border-right-0 border-bottom-0">{{ trans('bills.quantity') }}</th>
@stack('quantity_th_end')

@stack('price_th_start')
<th class="col-sm-2 text-right border-right-0 border-bottom-0">{{ trans('bills.price') }}</th>
<th class="text-right border-right-0 border-bottom-0">{{ trans('bills.price') }}</th>
@stack('price_th_end')

@stack('taxes_th_start')
<th class="col-sm-3 text-right border-right-0 border-bottom-0">{{ trans_choice('general.taxes', 1) }}</th>
<th class="text-right border-right-0 border-bottom-0">{{ trans_choice('general.taxes', 1) }}</th>
@stack('taxes_th_end')

@stack('total_th_start')
<th class="col-sm-2 text-right border-bottom-0">{{ trans('bills.total') }}</th>
<th class="text-right border-bottom-0 item-total">{{ trans('bills.total') }}</th>
@stack('total_th_end')
</tr>
</thead>
<tbody id="bill-item-rows">
@include('purchases.bills.item')

@stack('add_item_td_start')
<tr class="row" id="addItem">
<td class="col-sm-1 text-center border-right-0 border-bottom-0 px-0">
<tr id="addItem">
<td class="text-center border-right-0 border-bottom-0" colspan="1">
<button type="button" @click="onAddItem" id="button-add-item" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-icon btn-outline-success btn-lg" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i>
</button>
</td>
<td class="col-sm-11 text-right border-bottom-0"></td>
<td class="text-right border-bottom-0" colspan="5"></td>
</tr>
@stack('add_item_td_end')

@stack('sub_total_td_start')
<tr class="row" id="tr-subtotal">
<td class="col-sm-10 text-right border-right-0 border-bottom-0">
<tr id="tr-subtotal">
<td class="text-right border-right-0 border-bottom-0" colspan="5">
<strong>{{ trans('bills.sub_total') }}</strong>
</td>
<td class="col-sm-2 text-right border-bottom-0 long-texts">
<td class="text-right border-bottom-0 long-texts" colspan="1">
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand All @@ -87,8 +87,8 @@
@stack('sub_total_td_end')

@stack('add_discount_td_start')
<tr class="row" id="tr-discount">
<td class="col-sm-10 text-right border-right-0 border-bottom-0">
<tr id="tr-discount">
<td class="text-right border-right-0 border-bottom-0" colspan="5">
<el-popover
popper-class="p-0 h-0"
placement="bottom"
Expand Down Expand Up @@ -129,7 +129,7 @@
<el-link slot="reference" type="primary" v-if="totals.discount_text" v-html="totals.discount_text"></el-link>
</el-popover>
</td>
<td class="col-sm-2 text-right border-bottom-0">
<td class="text-right border-bottom-0" colspan="1">
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand All @@ -139,11 +139,11 @@
@stack('add_discount_td_end')

@stack('tax_total_td_start')
<tr class="row" id="tr-tax">
<td class="col-sm-10 text-right border-right-0 border-bottom-0">
<tr id="tr-tax">
<td class="text-right border-right-0 border-bottom-0" colspan="5">
<strong>{{ trans_choice('general.taxes', 1) }}</strong>
</td>
<td class="col-sm-2 text-right border-bottom-0 long-texts">
<td class="text-right border-bottom-0 long-texts" colspan="1">
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand All @@ -152,11 +152,11 @@
@stack('tax_total_td_end')

@stack('grand_total_td_start')
<tr class="row" id="tr-total">
<td class="col-sm-10 text-right border-right-0">
<tr id="tr-total">
<td class="text-right border-right-0" colspan="5">
<strong>{{ trans('bills.total') }}</strong>
</td>
<td class="col-sm-2 text-right long-texts">
<td class="text-right long-texts" colspan="1">
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="grand-total" v-if="totals.total" v-html="totals.total"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand Down
44 changes: 22 additions & 22 deletions resources/views/purchases/bills/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,51 +35,51 @@
<div class="table-responsive overflow-x-scroll overflow-y-hidden">
<table class="table table-bordered" id="items">
<thead class="thead-light">
<tr class="row">
<tr>
@stack('actions_th_start')
<th class="col-sm-1 text-center border-right-0 border-bottom-0 px-0">{{ trans('general.actions') }}</th>
<th class="text-center border-right-0 border-bottom-0">{{ trans('general.actions') }}</th>
@stack('actions_th_end')

@stack('name_th_start')
<th class="col-sm-3 text-left border-right-0 border-bottom-0">{{ trans('general.name') }}</th>
<th class="text-left border-right-0 border-bottom-0">{{ trans('general.name') }}</th>
@stack('name_th_end')

@stack('quantity_th_start')
<th class="col-sm-1 text-center border-right-0 border-bottom-0 px-0">{{ trans('bills.quantity') }}</th>
<th class="text-center border-right-0 border-bottom-0">{{ trans('bills.quantity') }}</th>
@stack('quantity_th_end')

@stack('price_th_start')
<th class="col-sm-2 text-right border-right-0 border-bottom-0">{{ trans('bills.price') }}</th>
<th class="text-right border-right-0 border-bottom-0">{{ trans('bills.price') }}</th>
@stack('price_th_end')

@stack('taxes_th_start')
<th class="col-sm-3 text-right border-right-0 border-bottom-0">{{ trans_choice('general.taxes', 1) }}</th>
<th class="text-right border-right-0 border-bottom-0">{{ trans_choice('general.taxes', 1) }}</th>
@stack('taxes_th_end')

@stack('total_th_start')
<th class="col-sm-2 text-right border-bottom-0">{{ trans('bills.total') }}</th>
<th class="text-right border-bottom-0 item-total">{{ trans('bills.total') }}</th>
@stack('total_th_end')
</tr>
</thead>
<tbody id="bill-item-rows">
@include('purchases.bills.item')

@stack('add_item_td_start')
<tr class="row" id="addItem">
<td class="col-sm-1 text-center border-right-0 border-bottom-0 px-0">
<tr id="addItem">
<td class="text-center border-right-0 border-bottom-0" colspan="1">
<button type="button" @click="onAddItem" id="button-add-item" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-icon btn-outline-success btn-lg" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i>
</button>
</td>
<td class="col-sm-11 text-right border-bottom-0"></td>
<td class="text-right border-bottom-0" colspan="5"></td>
</tr>
@stack('add_item_td_end')

@stack('sub_total_td_start')
<tr class="row" id="tr-subtotal">
<td class="col-sm-10 text-right border-right-0 border-bottom-0">
<tr id="tr-subtotal">
<td class="text-right border-right-0 border-bottom-0" colspan="5">
<strong>{{ trans('bills.sub_total') }}</strong>
</td>
<td class="col-sm-2 text-right border-bottom-0 long-texts">
<td class="text-right border-bottom-0 long-texts" colspan="1">
{{ Form::moneyGroup('sub_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.sub', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="sub-total" v-if="totals.sub" v-html="totals.sub"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand All @@ -88,8 +88,8 @@
@stack('sub_total_td_end')

@stack('add_discount_td_start')
<tr class="row" id="tr-discount">
<td class="col-sm-10 text-right border-right-0 border-bottom-0">
<tr id="tr-discount">
<td class="text-right border-right-0 border-bottom-0" colspan="5">
<el-popover
popper-class="p-0 h-0"
placement="bottom"
Expand Down Expand Up @@ -130,7 +130,7 @@
<el-link slot="reference" type="primary" v-if="totals.discount_text" v-html="totals.discount_text"></el-link>
</el-popover>
</td>
<td class="col-sm-2 text-right border-bottom-0">
<td class="text-right border-bottom-0" colspan="1">
{{ Form::moneyGroup('discount_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.discount', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="discount-total" v-if="totals.discount" v-html="totals.discount"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand All @@ -140,11 +140,11 @@
@stack('add_discount_td_end')

@stack('tax_total_td_start')
<tr class="row" id="tr-tax">
<td class="col-sm-10 text-right border-right-0 border-bottom-0">
<tr id="tr-tax">
<td class="text-right border-right-0 border-bottom-0" colspan="5">
<strong>{{ trans_choice('general.taxes', 1) }}</strong>
</td>
<td class="col-sm-2 text-right border-bottom-0 long-texts">
<td class="text-right border-bottom-0 long-texts" colspan="1">
{{ Form::moneyGroup('tax_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.tax', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="tax-total" v-if="totals.tax" v-html="totals.tax"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand All @@ -153,11 +153,11 @@
@stack('tax_total_td_end')

@stack('grand_total_td_start')
<tr class="row" id="tr-total">
<td class="col-sm-10 text-right border-right-0">
<tr id="tr-total">
<td class="text-right border-right-0" colspan="5">
<strong>{{ trans('bills.total') }}</strong>
</td>
<td class="col-sm-2 text-right long-texts">
<td class="text-right long-texts" colspan="1">
{{ Form::moneyGroup('grand_total', '', '', ['disabled' => 'disabled', 'required' => 'required', 'v-model' => 'totals.total', 'currency' => $currency, 'dynamic-currency' => 'currency', 'masked' => 'true'], 0.00, 'text-right d-none') }}
<span id="grand-total" v-if="totals.total" v-html="totals.total"></span>
<span v-else>@money(0, $currency->code, true)</span>
Expand Down

0 comments on commit 6cbf8ed

Please sign in to comment.