Invoice/ Bill show and print add stacks
This commit is contained in:
		@@ -119,40 +119,58 @@
 | 
			
		||||
                <div class="col-xs-7">
 | 
			
		||||
                    {{ trans('bills.bill_from') }}
 | 
			
		||||
                    <address>
 | 
			
		||||
                        @stack('name_input_start')
 | 
			
		||||
                        <strong>{{ $bill->vendor_name }}</strong><br>
 | 
			
		||||
                        @stack('name_input_end')
 | 
			
		||||
                        @stack('address_input_start')
 | 
			
		||||
                        {!! nl2br($bill->vendor_address) !!}<br>
 | 
			
		||||
                        @stack('address_input_end')
 | 
			
		||||
                        @stack('tax_number_input_start')
 | 
			
		||||
                        @if ($bill->vendor_tax_number)
 | 
			
		||||
                        {{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
 | 
			
		||||
                        @endif
 | 
			
		||||
                        @stack('tax_number_input_end')
 | 
			
		||||
                        <br>
 | 
			
		||||
                        @stack('phone_input_start')
 | 
			
		||||
                        @if ($bill->vendor_phone)
 | 
			
		||||
                        {{ $bill->vendor_phone }}<br>
 | 
			
		||||
                        @endif
 | 
			
		||||
                        @stack('phone_input_end')
 | 
			
		||||
                        @stack('email_start')
 | 
			
		||||
                        {{ $bill->vendor_email }}
 | 
			
		||||
                        @stack('email_input_end')
 | 
			
		||||
                    </address>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="col-xs-5">
 | 
			
		||||
                    <div class="table-responsive">
 | 
			
		||||
                        <table class="table no-border">
 | 
			
		||||
                            <tbody>
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                <th>{{ trans('bills.bill_number') }}:</th>
 | 
			
		||||
                                <td class="text-right">{{ $bill->bill_number }}</td>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            @if ($bill->order_number)
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                <th>{{ trans('bills.order_number') }}:</th>
 | 
			
		||||
                                <td class="text-right">{{ $bill->order_number }}</td>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            @endif
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                <th>{{ trans('bills.bill_date') }}:</th>
 | 
			
		||||
                                <td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                <th>{{ trans('bills.payment_due') }}:</th>
 | 
			
		||||
                                <td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                                @stack('bill_number_input_start')
 | 
			
		||||
                                <tr>
 | 
			
		||||
                                    <th>{{ trans('bills.bill_number') }}:</th>
 | 
			
		||||
                                    <td class="text-right">{{ $bill->bill_number }}</td>
 | 
			
		||||
                                </tr>
 | 
			
		||||
                                @stack('bill_number_input_end')
 | 
			
		||||
                                @stack('order_number_input_start')
 | 
			
		||||
                                @if ($bill->order_number)
 | 
			
		||||
                                <tr>
 | 
			
		||||
                                    <th>{{ trans('bills.order_number') }}:</th>
 | 
			
		||||
                                    <td class="text-right">{{ $bill->order_number }}</td>
 | 
			
		||||
                                </tr>
 | 
			
		||||
                                @endif
 | 
			
		||||
                                @stack('order_number_input_end')
 | 
			
		||||
                                @stack('billed_at_input_start')
 | 
			
		||||
                                <tr>
 | 
			
		||||
                                    <th>{{ trans('bills.bill_date') }}:</th>
 | 
			
		||||
                                    <td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
 | 
			
		||||
                                </tr>
 | 
			
		||||
                                @stack('billed_at_input_end')
 | 
			
		||||
                                @stack('due_at_input_start')
 | 
			
		||||
                                <tr>
 | 
			
		||||
                                    <th>{{ trans('bills.payment_due') }}:</th>
 | 
			
		||||
                                    <td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
 | 
			
		||||
                                </tr>
 | 
			
		||||
                                @stack('due_at_input_end')
 | 
			
		||||
                            </tbody>
 | 
			
		||||
                        </table>
 | 
			
		||||
                    </div>
 | 
			
		||||
@@ -164,22 +182,46 @@
 | 
			
		||||
                    <table class="table table-striped">
 | 
			
		||||
                        <tbody>
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                @stack('actions_th_start')
 | 
			
		||||
                                @stack('actions_th_end')
 | 
			
		||||
                                @stack('name_th_start')
 | 
			
		||||
                                <th>{{ trans_choice('general.items', 1) }}</th>
 | 
			
		||||
                                @stack('name_th_end')
 | 
			
		||||
                                @stack('quantity_th_start')
 | 
			
		||||
                                <th class="text-center">{{ trans('bills.quantity') }}</th>
 | 
			
		||||
                                @stack('quantity_th_end')
 | 
			
		||||
                                @stack('price_th_start')
 | 
			
		||||
                                <th class="text-right">{{ trans('bills.price') }}</th>
 | 
			
		||||
                                @stack('price_th_end')
 | 
			
		||||
                                @stack('taxes_th_start')
 | 
			
		||||
                                @stack('taxes_th_end')
 | 
			
		||||
                                @stack('total_th_start')
 | 
			
		||||
                                <th class="text-right">{{ trans('bills.total') }}</th>
 | 
			
		||||
                                @stack('total_th_end')
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            @foreach($bill->items as $item)
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                @stack('actions_td_start')
 | 
			
		||||
                                @stack('actions_td_end')
 | 
			
		||||
                                @stack('name_td_start')
 | 
			
		||||
                                <td>
 | 
			
		||||
                                    {{ $item->name }}
 | 
			
		||||
                                    @if ($item->sku)
 | 
			
		||||
                                        <br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
 | 
			
		||||
                                    @endif
 | 
			
		||||
                                </td>
 | 
			
		||||
                                @stack('name_td_end')
 | 
			
		||||
                                @stack('quantity_td_start')
 | 
			
		||||
                                <td class="text-center">{{ $item->quantity }}</td>
 | 
			
		||||
                                @stack('quantity_td_end')
 | 
			
		||||
                                @stack('price_td_start')
 | 
			
		||||
                                <td class="text-right">@money($item->price, $bill->currency_code, true)</td>
 | 
			
		||||
                                @stack('price_td_end')
 | 
			
		||||
                                @stack('taxes_td_start')
 | 
			
		||||
                                @stack('taxes_td_end')
 | 
			
		||||
                                @stack('total_td_start')
 | 
			
		||||
                                <td class="text-right">@money($item->total, $bill->currency_code, true)</td>
 | 
			
		||||
                                @stack('total_td_end')
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            @endforeach
 | 
			
		||||
                        </tbody>
 | 
			
		||||
@@ -189,13 +231,15 @@
 | 
			
		||||
 | 
			
		||||
            <div class="row">
 | 
			
		||||
                <div class="col-xs-7">
 | 
			
		||||
                    @if ($bill->notes)
 | 
			
		||||
                        <p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
 | 
			
		||||
                @stack('notes_input_start')
 | 
			
		||||
                @if ($bill->notes)
 | 
			
		||||
                    <p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
 | 
			
		||||
 | 
			
		||||
                        <p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
 | 
			
		||||
                            {{ $bill->notes }}
 | 
			
		||||
                        </p>
 | 
			
		||||
                    @endif
 | 
			
		||||
                    <p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
 | 
			
		||||
                        {{ $bill->notes }}
 | 
			
		||||
                    </p>
 | 
			
		||||
                @endif
 | 
			
		||||
                @stack('notes_input_end')
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="col-xs-5">
 | 
			
		||||
                    <div class="table-responsive">
 | 
			
		||||
@@ -203,10 +247,12 @@
 | 
			
		||||
                            <tbody>
 | 
			
		||||
                                @foreach ($bill->totals as $total)
 | 
			
		||||
                                @if ($total->code != 'total')
 | 
			
		||||
                                    @stack($total->code . '_td_start')
 | 
			
		||||
                                    <tr>
 | 
			
		||||
                                        <th>{{ trans($total->title) }}:</th>
 | 
			
		||||
                                        <td class="text-right">@money($total->amount, $bill->currency_code, true)</td>
 | 
			
		||||
                                    </tr>
 | 
			
		||||
                                    @stack($total->code . '_td_end')
 | 
			
		||||
                                @else
 | 
			
		||||
                                    @if ($bill->paid)
 | 
			
		||||
                                        <tr class="text-success">
 | 
			
		||||
@@ -214,10 +260,12 @@
 | 
			
		||||
                                            <td class="text-right">- @money($bill->paid, $bill->currency_code, true)</td>
 | 
			
		||||
                                        </tr>
 | 
			
		||||
                                    @endif
 | 
			
		||||
                                    @stack('grand_total_td_start')
 | 
			
		||||
                                    <tr>
 | 
			
		||||
                                        <th>{{ trans($total->name) }}:</th>
 | 
			
		||||
                                        <td class="text-right">@money($total->amount - $bill->paid, $bill->currency_code, true)</td>
 | 
			
		||||
                                    </tr>
 | 
			
		||||
                                    @stack('grand_total_td_end')
 | 
			
		||||
                                @endif
 | 
			
		||||
                                @endforeach
 | 
			
		||||
                            </tbody>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user