mirror of
https://github.com/crater-invoice/crater.git
synced 2025-11-01 14:11:09 -04:00
v5.0.0 update
This commit is contained in:
@ -391,8 +391,8 @@
|
||||
@if($logo)
|
||||
<img class="header-logo" src="{{ $logo }}" alt="Company Logo">
|
||||
@else
|
||||
@if($estimate->user->company)
|
||||
<h2 class="header-logo"> {{$estimate->user->company->name}} </h2>
|
||||
@if($estimate->customer->company)
|
||||
<h2 class="header-logo"> {{$estimate->customer->company->name}} </h2>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@ -403,8 +403,8 @@
|
||||
</td>
|
||||
@else
|
||||
<td width="60%" class="header-section-left" style="padding-top: 0px;">
|
||||
@if($estimate->user->company)
|
||||
<h1 class="header-logo"> {{$estimate->user->company->name}} </h1>
|
||||
@if($estimate->customer->company)
|
||||
<h1 class="header-logo"> {{$estimate->customer->company->name}} </h1>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@ -351,7 +351,7 @@
|
||||
@if($logo)
|
||||
<img class="header-logo" src="{{ $logo }}" alt="Company Logo">
|
||||
@else
|
||||
<h1 class="header-logo"> {{$estimate->user->company->name}} </h1>
|
||||
<h1 class="header-logo"> {{$estimate->customer->company->name}} </h1>
|
||||
@endif
|
||||
</td>
|
||||
<td width="50%" class="text-right company-address-container company-address">
|
||||
@ -373,7 +373,7 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div @if($estimate->user->billingaddress) class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" @endif>
|
||||
<div @if($estimate->customer->billingaddress) class="shipping-address-container shipping-address" @else class="shipping-address-container--left shipping-address" @endif>
|
||||
@if($shipping_address)
|
||||
<b>@lang('pdf_ship_to')</b> <br>
|
||||
{!! $shipping_address !!}
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
<tr class="item-table-heading-row">
|
||||
<th width="2%" class="pr-20 text-right item-table-heading">#</th>
|
||||
<th width="40%" class="pl-0 text-left item-table-heading">@lang('pdf_items_label')</th>
|
||||
@foreach($customFields as $field)
|
||||
<th class="text-right item-table-heading">{{ $field->label }}</th>
|
||||
@endforeach
|
||||
<th class="pr-20 text-right item-table-heading">@lang('pdf_quantity_label')</th>
|
||||
<th class="pr-20 text-right item-table-heading">@lang('pdf_price_label')</th>
|
||||
@if($estimate->discount_per_item === 'YES')
|
||||
@ -30,6 +33,11 @@
|
||||
{!! nl2br(htmlspecialchars($item->description)) !!}
|
||||
</span>
|
||||
</td>
|
||||
@foreach($customFields as $field)
|
||||
<td class="text-right item-cell" style="vertical-align: top;">
|
||||
{{ $item->getCustomFieldValueBySlug($field->slug) }}
|
||||
</td>
|
||||
@endforeach
|
||||
<td
|
||||
class="pr-20 text-right item-cell"
|
||||
style="vertical-align: top;"
|
||||
@ -40,12 +48,12 @@
|
||||
class="pr-20 text-right item-cell"
|
||||
style="vertical-align: top;"
|
||||
>
|
||||
{!! format_money_pdf($item->price, $estimate->user->currency) !!}
|
||||
{!! format_money_pdf($item->price, $estimate->customer->currency) !!}
|
||||
</td>
|
||||
@if($estimate->discount_per_item === 'YES')
|
||||
<td class="pl-10 text-right item-cell" style="vertical-align: top;">
|
||||
@if($item->discount_type === 'fixed')
|
||||
{!! format_money_pdf($item->discount_val, $estimate->user->currency) !!}
|
||||
{!! format_money_pdf($item->discount_val, $estimate->customer->currency) !!}
|
||||
@endif
|
||||
@if($item->discount_type === 'percentage')
|
||||
{{$item->discount}}%
|
||||
@ -53,7 +61,7 @@
|
||||
</td>
|
||||
@endif
|
||||
<td class="text-right item-cell" style="vertical-align: top;">
|
||||
{!! format_money_pdf($item->total, $estimate->user->currency) !!}
|
||||
{!! format_money_pdf($item->total, $estimate->customer->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@php
|
||||
@ -68,32 +76,9 @@
|
||||
<table width="100%" cellspacing="0px" border="0" class="total-display-table @if(count($estimate->items) > 12) page-break @endif">
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">@lang('pdf_subtotal')</td>
|
||||
<td class="border-0 item-cell total-table-attribute-value ">{!! format_money_pdf($estimate->sub_total, $estimate->user->currency) !!}</td>
|
||||
<td class="border-0 item-cell total-table-attribute-value ">{!! format_money_pdf($estimate->sub_total, $estimate->customer->currency) !!}</td>
|
||||
</tr>
|
||||
|
||||
@if ($estimate->tax_per_item === 'YES')
|
||||
@foreach ($taxes as $tax)
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">
|
||||
{{$tax->name.' ('.$tax->percent.'%)'}}
|
||||
</td>
|
||||
<td class="py-2 border-0 item-cell total-table-attribute-value">
|
||||
{!! format_money_pdf($tax->amount, $estimate->user->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($estimate->taxes as $tax)
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">
|
||||
{{$tax->name.' ('.$tax->percent.'%)'}}
|
||||
</td>
|
||||
<td class="border-0 item-cell total-table-attribute-value" >
|
||||
{!! format_money_pdf($tax->amount, $estimate->user->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if($estimate->discount > 0)
|
||||
@if ($estimate->discount_per_item === 'NO')
|
||||
<tr>
|
||||
@ -107,15 +92,40 @@
|
||||
</td>
|
||||
<td class="text-right border-0 item-cell total-table-attribute-value">
|
||||
@if($estimate->discount_type === 'fixed')
|
||||
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
|
||||
{!! format_money_pdf($estimate->discount_val, $estimate->customer->currency) !!}
|
||||
@endif
|
||||
@if($estimate->discount_type === 'percentage')
|
||||
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
|
||||
{!! format_money_pdf($estimate->discount_val, $estimate->customer->currency) !!}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($estimate->tax_per_item === 'YES')
|
||||
@foreach ($taxes as $tax)
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">
|
||||
{{$tax->name.' ('.$tax->percent.'%)'}}
|
||||
</td>
|
||||
<td class="py-2 border-0 item-cell total-table-attribute-value">
|
||||
{!! format_money_pdf($tax->amount, $estimate->customer->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($estimate->taxes as $tax)
|
||||
<tr>
|
||||
<td class="border-0 total-table-attribute-label">
|
||||
{{$tax->name.' ('.$tax->percent.'%)'}}
|
||||
</td>
|
||||
<td class="border-0 item-cell total-table-attribute-value" >
|
||||
{!! format_money_pdf($tax->amount, $estimate->customer->currency) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td class="py-3"></td>
|
||||
<td class="py-3"></td>
|
||||
@ -123,7 +133,7 @@
|
||||
<tr>
|
||||
<td class="border-0 total-border-left total-table-attribute-label">@lang('pdf_total')</td>
|
||||
<td class="py-8 border-0 total-border-right item-cell total-table-attribute-value" style="color: #5851D8">
|
||||
{!! format_money_pdf($estimate->total, $estimate->user->currency)!!}
|
||||
{!! format_money_pdf($estimate->total, $estimate->customer->currency)!!}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user