Show template edited

This commit is contained in:
Burak Civan 2021-06-25 18:10:58 +03:00
parent eb8d94a31a
commit 2f85448ff7
5 changed files with 282 additions and 278 deletions

View File

@ -837,7 +837,7 @@ abstract class TransactionShow extends Base
return $class; return $class;
} }
return 'col-md-2'; return 'col-4 col-lg-3';
} }
protected function getClassHeaderContact($type, $classHeaderContact) protected function getClassHeaderContact($type, $classHeaderContact)
@ -852,7 +852,7 @@ abstract class TransactionShow extends Base
return $class; return $class;
} }
return 'col-md-3'; return 'col-4 col-lg-2';
} }
protected function getClassHeaderCategory($type, $classHeaderCategory) protected function getClassHeaderCategory($type, $classHeaderCategory)
@ -867,7 +867,7 @@ abstract class TransactionShow extends Base
return $class; return $class;
} }
return 'col-md-3'; return 'col-4 col-lg-3';
} }
protected function getClassHeaderAmount($type, $classHeaderAmount) protected function getClassHeaderAmount($type, $classHeaderAmount)
@ -882,7 +882,7 @@ abstract class TransactionShow extends Base
return $class; return $class;
} }
return 'col-md-2'; return 'col-4 col-lg-2';
} }
protected function getClassHeaderPaidAt($type, $classHeaderPaidAt) protected function getClassHeaderPaidAt($type, $classHeaderPaidAt)
@ -897,7 +897,7 @@ abstract class TransactionShow extends Base
return $class; return $class;
} }
return 'col-md-2'; return 'col-4 col-lg-2';
} }
protected function getTextContentTitle($type, $textContentTitle) protected function getTextContentTitle($type, $textContentTitle)
@ -1187,4 +1187,4 @@ abstract class TransactionShow extends Base
return 'col-sm-6 col-md-6 col-lg-6 col-xl-6'; return 'col-sm-6 col-md-6 col-lg-6 col-xl-6';
} }
} }

16
public/css/custom.css vendored
View File

@ -220,6 +220,22 @@ button:focus {
.mwpx-100 { .mwpx-100 {
max-width: 100px !important; max-width: 100px !important;
} }
.mwpx-200 {
max-width: 200px !important;
}
.mwpx-300 {
max-width: 300px !important;
}
.mwpx-400 {
max-width: 400px !important;
}
.mwpx-500 {
max-width: 500px !important;
}
/*--------Max Width 100 Pixel Finish--------*/ /*--------Max Width 100 Pixel Finish--------*/
/*--------Form Group--------*/ /*--------Form Group--------*/

32
public/css/print.css vendored
View File

@ -252,7 +252,7 @@ th, td
.col-16 .col-16
{ {
display: inline-block; display: inline-block;
width: 16%; max-width: 16%;
vertical-align: top; vertical-align: top;
} }
@ -516,14 +516,8 @@ th, td
font-size: 32px; font-size: 32px;
} }
.show-head {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.show-card-body { .show-card-body {
padding: 1.5rem 4.5rem; padding: 1.5rem 2.5rem;
} }
.show-card-bg-success { .show-card-bg-success {
@ -537,4 +531,26 @@ th, td
.show-company p { .show-company p {
min-height: 52px; min-height: 52px;
}
@media (max-width: 1200px) {
.transaction-head-text {
max-width: 100px !important;
}
}
@media (max-width: 991px) {
.transaction-head-text {
max-width: 75px !important;
}
}
@media (max-width: 575.98px) {
.show-card {
overflow-y: scroll;
}
.show-card-body {
padding: 1.5rem 1.5rem;
}
} }

View File

@ -6,7 +6,7 @@
<br> <br>
<strong> <strong>
<span class="float-left"> <span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transaction->account->name }} {{ $transaction->account->name }}
</span> </span>
</strong> </strong>
@ -22,7 +22,7 @@
<br> <br>
<strong> <strong>
<span class="float-left"> <span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transaction->category->name }} {{ $transaction->category->name }}
</span> </span>
</strong> </strong>
@ -38,7 +38,7 @@
<br> <br>
<strong> <strong>
<span class="float-left"> <span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transaction->contact->name }} {{ $transaction->contact->name }}
</span> </span>
</strong> </strong>
@ -54,7 +54,7 @@
<br> <br>
<strong> <strong>
<span class="float-left"> <span class="float-left long-texts mwpx-100 transaction-head-text">
@money($transaction->amount, $transaction->currency_code, true) @money($transaction->amount, $transaction->currency_code, true)
</span> </span>
</strong> </strong>
@ -70,7 +70,7 @@
<br> <br>
<strong> <strong>
<span class="float-left"> <span class="float-left long-texts mwpx-100 transaction-head-text">
@date($transaction->paid_at) @date($transaction->paid_at)
</span> </span>
</strong> </strong>
@ -78,4 +78,4 @@
</div> </div>
@endif @endif
@stack('header_paid_at_end') @stack('header_paid_at_end')
</div> </div>

View File

@ -1,311 +1,283 @@
@stack('company_start') @stack('company_start')
@if (!$hideCompany) @if (!$hideCompany)
<div class="row border-bottom-1 pt-6 pb-6"> <table class="border-bottom-1">
<div class="col-16"> <tr>
<div class="text company"> <td style="width:5%;" valign="top">
@stack('company_logo_start') @stack('company_logo_start')
@if (!$hideCompanyLogo) @if (!$hideCompanyLogo)
@if (!empty($transaction->contact->logo) && !empty($transaction->contact->logo->id)) @if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
<img src="{{ Storage::url($transaction->contact->logo->id) }}" height="128" width="128" alt="{{ $transaction->contact->name }}"/> <img src="{{ Storage::url($document->contact->logo->id) }}" height="128" width="128" alt="{{ $document->contact_name }}" />
@else @else
<img src="{{ $logo }}" alt="{{ setting('company.name') }}"/> <img src="{{ $logo }}" alt="{{ setting('company.name') }}" />
@endif @endif
@endif @endif
@stack('company_logo_end') @stack('company_logo_end')
</div> </td>
</div> <td style="width: 60%;">
<div class="col-42">
<div class="text company lead">
@stack('company_details_start') @stack('company_details_start')
@if (!$hideCompanyDetails) @if (!$hideCompanyDetails)
@if (!$hideCompanyName) @if (!$hideCompanyName)
<h2 class="mb-1"> <h2 class="mb-1" style="font-size: 16px;">
{{ setting('company.name') }} {{ setting('company.name') }}
</h2> </h2>
@endif @endif
@if (!$hideCompanyAddress) @if (!$hideCompanyAddress)
<p>{!! nl2br(setting('company.address')) !!}</p> <p style="margin:0; padding:0; font-size:14px;">{!! nl2br(setting('company.address')) !!}</p>
@endif @endif
@if (!$hideCompanyTaxNumber) @if (!$hideCompanyTaxNumber)
<p> <p style="margin:0; padding:0; font-size:14px;">
@if (setting('company.tax_number')) @if (setting('company.tax_number'))
{{ trans('general.tax_number') }}: {{ setting('company.tax_number') }} {{ trans('general.tax_number') }}: {{ setting('company.tax_number') }}
@endif @endif
</p> </p>
@endif @endif
@if (!$hideCompanyPhone) @if (!$hideCompanyPhone)
<p> <p style="margin:0; padding:0; font-size:14px;">
@if (setting('company.phone')) @if (setting('company.phone'))
{{ setting('company.phone') }} {{ setting('company.phone') }}
@endif @endif
</p> </p>
@endif @endif
@if (!$hideCompanyEmail) @if (!$hideCompanyEmail)
<p>{{ setting('company.email') }}</p> <p style="margin:0; padding:0; font-size:14px;">{{ setting('company.email') }}</p>
@endif @endif
@endif @endif
@stack('company_details_end') @stack('company_details_end')
</div> </td>
</div> </tr>
</div> </table>
@endif @endif
@stack('company_end') @stack('company_end')
<div class="row border-bottom-1 w-100 mt-6 pb-6 d-flex flex-column"> @if (!$hideContentTitle)
@if (!$hideContentTitle) <table>
<h2 class="text-center text-uppercase mb-6"> <tr>
{{ trans($textContentTitle) }} <td style="padding-bottom: 0; padding-top: 32px;">
</h2> <h2 class="text-center text-uppercase" style="font-size: 16px;">{{ trans('invoices.revenue_made') }}</h2>
@endif </td>
</tr>
</table>
@endif
<div class="d-flex"> <table>
<div class="d-flex flex-column col-lg-7 pl-0"> <tr>
<div class="d-flex mt-3"> <td style="width: 70%; padding-top:0; padding-bottom:0;">
<div class="text company show-company col-lg-4 pl-0"> <table>
@if (!$hidePaidAt) @if (!$hidePaidAt)
<p> <tr>
<strong>{{ trans($textPaidAt) }}:</strong> <td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">{{ trans('general.date') }}:</td>
</p> <td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;"> @date($transaction->paid_at)</td>
@endif </tr>
@endif
@if (!$hideAccount) @if (!$hideAccount)
<p> <tr>
<strong>{{ trans_choice($textAccount, 1) }}:</strong> <td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">{{ trans_choice('general.accounts', 1) }}:</td>
</p> <td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">{{ $transaction->account->name }}</td>
@endif </tr>
@endif
@if (!$hideCategory) @if (!$hideCategory)
<p> <tr>
{{ trans_choice($textCategory, 1) }}:</strong> <td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">{{ trans_choice('general.categories', 1) }}:</td>
</p> <td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">{{ $transaction->category->name }}</td>
@endif </tr>
@endif
@if (!$hidePaymentMethods) @if (!$hidePaymentMethods)
<p> <tr>
<strong>{{ trans_choice($textPaymentMethods, 1) }}:</strong> <td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">{{ trans_choice('general.payment_methods', 1) }}:</td>
</p> <td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">{{ $payment_methods[$transaction->payment_method] }}</td>
@endif </tr>
@endif
@if (!$hideReference) @if (!$hideReference)
<p> <tr>
<strong>{{ trans($textReference) }}:</strong> <td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">{{ trans('general.reference') }}:</td>
</p> <td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">{{ $transaction->reference }}</td>
@endif </tr>
@endif
@if (!$hideDescription) @if (!$hideDescription)
<p> <tr>
<strong>{{ trans($textDescription) }}:</strong> <td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">{{ trans('general.description') }}:</td>
</p> <td style="width:80%; padding-bottom:3px; font-size:14px;">
@endif <p style="font-size:14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0;">{!! nl2br($transaction->description) !!}</p>
</div> </td>
</tr>
@endif
@if (!$hideContact)
<tr>
<td style="padding-top:45px; padding-bottom:0;">
<h2 style="font-size: 16px;">{{ trans('general.paid_by') }}</h2>
</td>
</tr>
@if ($hideContactInfo)
<tr>
<td style="padding-bottom:5px; padding-top:0; font-size:14px;">
<strong>{{ trans($textContactInfo) }}</strong><br>
</td>
</tr>
@endif
<div class="text company col-lg-8 pr-0 show-company show-company-value"> @stack('name_input_start')
@if (!$hidePaidAt) @if (!$hideContactName)
<p class="border-bottom-1"> <tr>
@date($transaction->paid_at) <td style="padding-bottom:5px; padding-top:0; font-size:14px;">
</p> <strong>{{ $transaction->contact->name }}</strong><br>
@endif </td>
</tr>
@endif
@stack('name_input_end')
@if (!$hideAccount) @stack('address_input_start')
<p class="border-bottom-1"> @if (!$hideContactAddress)
{{ $transaction->account->name }} <tr>
</p> <td style="padding-bottom:5px; padding-top:0; font-size:14px;">
@endif <p style="margin:0; padding:0; font-size:14px;">{!! nl2br($transaction->contact->address) !!}</p>
</td>
</tr>
@endif
@stack('address_input_end')
@if (!$hideCategory) @stack('tax_number_input_start')
<p class="border-bottom-1"> @if (!$hideContactTaxNumber)
{{ $transaction->category->name }} <tr>
</p> <td style="padding-bottom:5px; padding-top:0; font-size:14px;">
@endif <p style="margin:0; padding:0; font-size:14px;">
@if ($transaction->contact->tax_number)
@if (!$hidePaymentMethods)
<p class="border-bottom-1">
{{ $payment_methods[$transaction->payment_method] }}
</p>
@endif
@if (!$hideReference)
<p class="border-bottom-1">
{{ $transaction->reference }}
</p>
@endif
@if (!$hideDescription)
<p>
{!! nl2br($transaction->description) !!}
</p>
@endif
</div>
</div>
@if (!$hideContact)
<div class="text company mt-5">
<h2>{{ trans($textPaidBy) }}</h2>
@if ($hideContactInfo)
<strong>{{ trans($textContactInfo) }}</strong><br>
@endif
@stack('name_input_start')
@if (!$hideContactName)
<strong>{{ $transaction->contact->name }}</strong><br>
@endif
@stack('name_input_end')
@stack('address_input_start')
@if (!$hideContactAddress)
<p>{!! nl2br($transaction->contact->address) !!}</p>
@endif
@stack('address_input_end')
@stack('tax_number_input_start')
@if (!$hideContactTaxNumber)
<p>
@if ($transaction->contact->tax_number)
{{ trans('general.tax_number') }}: {{ $transaction->contact->tax_number }} {{ trans('general.tax_number') }}: {{ $transaction->contact->tax_number }}
@endif @endif
</p> </p>
@endif </td>
@stack('tax_number_input_end') </tr>
@endif
@stack('tax_number_input_end')
@stack('phone_input_start') @stack('phone_input_start')
@if (!$hideContactPhone) @if (!$hideContactPhone)
<p> <tr>
@if ($transaction->contact->phone) <td style="padding-bottom:0; padding-top:0; font-size:14px;">
<p style="margin:0; padding:0; font-size:14px;">
@if ($transaction->contact->phone)
{{ $transaction->contact->phone }} {{ $transaction->contact->phone }}
@endif @endif
</p> </p>
@endif </td>
@stack('phone_input_end') </tr>
@endif
@stack('email_start') @stack('phone_input_end')
@if (!$hideContactEmail)
<p>
{{ $transaction->contact->email }}
</p>
@endif
@stack('email_input_end')
</div>
@endif
</div>
@stack('email_start')
@if (!$hideContactEmail)
<tr>
<td style="padding-bottom:0; padding-top:0; font-size:14px;">
<p style="margin:0; padding:0; font-size:14px;">
{{ $transaction->contact->email }}
</p>
</td>
</tr>
@endif
@stack('email_input_end')
@endif
</table>
</td>
@if (!$hideAmount) @if (!$hideAmount)
<div class="d-flex flex-column align-items-end col-lg-5 pr-0"> <td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<div class="card bg-success show-card-bg-success border-0 mt-4 mb-0"> <table>
<div class="card-body"> <tr>
<div class="row"> <td style="background-color: #6da252; -webkit-print-color-adjust: exact; width: 280px; font-weight:bold !important; display:block;">
<div class="col card-amount-badge text-center mt-3"> <h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">{{ trans('general.amount') }}</h5>
<h5 class="text-muted mb-0 text-white"> <p class="font-weight-bold mb-0 text-white" style="font-size: 32px; color:#ffffff; text-align:center;">
{{ trans($textAmount) }} @money($transaction->amount, $transaction->currency_code, true)
</h5> </p>
</td>
<span class="h2 font-weight-bold mb-0 text-white"> </tr>
@money($transaction->amount, $transaction->currency_code, true) </table>
</span> </td>
</div>
</div>
</div>
</div>
</div>
@endif @endif
</div> </tr>
</div> </table>
<table>
<tr>
<td class="border-bottom-1" style="padding-bottom: 0; padding-top:16px;"></td>
</tr>
</table>
@if (!$hideReletad) @if (!$hideReletad)
@if ($transaction->document) @if ($transaction->document)
<div class="row mt-3 mb-3"> <table>
<div class="col-100"> <tr>
<div class="text"> <td style="padding-bottom: 0; padding-top:36px;">
<h3>{{ trans($textReleatedTransansaction) }}</h3> <h2 style="font-size: 16px;">{{ trans('invoices.related_revenue') }}</h2>
</td>
</tr>
</table>
<table class="table table-flush table-hover" cellspacing="0" cellpadding="0" style="margin-bottom: 36px;">
<thead style="background-color: #f6f9fc; -webkit-print-color-adjust: exact; font-family: Arial, sans-serif; color:#8898aa; font-size:11px;">
<tr class="border-bottom-1">
<th class="item text-left" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
<span>{{ trans_choice('general.numbers', 1) }}</span>
</th>
<table class="table table-flush table-hover mt-3"> <th class="quantity" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
<thead class="thead-light"> {{ trans_choice('general.customers', 1) }}
<tr class="border-bottom-1"> </th>
@if (!$hideReletadDocumentNumber)
<th class="item text-left">
<span>{{ trans_choice($textReleatedDocumentNumber, 1) }}</span>
</th>
@endif
@if (!$hideReletadContact) <th class="price" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
<th class="quantity"> {{ trans('invoices.invoice_date') }}
{{ trans_choice($textReleatedContact, 1) }} </th>
</th>
@endif
@if (!$hideReletadDocumentDate) <th class="price" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
<th class="price"> {{ trans('invoices.invoice_date') }}
{{ trans($textReleatedDocumentDate) }} </th>
</th>
@endif
@if (!$hideReletadDocumentAmount) <th class="total" style="text-align: left; text-transform: uppercase; font-family: Arial, sans-serif;">
<th class="price"> {{ trans('general.amount') }}
{{ trans($textReleatedDocumentAmount) }} </th>
</th> </tr>
@endif </thead>
@if (!$hideReletadAmount) <tbody>
<th class="total"> <tr>
{{ trans($textReleatedAmount) }} <td class="item" style="color:#525f7f; font-size:13px;">
</th> <a style="color:#6da252 !important;" href="{{ route('invoices.show' , $transaction->document->id) }}">
@endif {{ $transaction->document->document_number }}
</tr> </a>
</thead> </td>
<tbody> <td class="quantity" style="color:#525f7f; font-size:13px;">
<tr class="border-bottom-1"> {{ $transaction->document->contact_name }}
@if (!$hideReletadDocumentNumber) </td>
<td class="item">
<a href="{{ route($routeDocumentShow, $transaction->document->id) }}">
{{ $transaction->document->document_number }}
</a>
</td>
@endif
@if (!$hideReletadContact) <td class="price" style="color:#525f7f; font-size:13px;">
<td class="quantity"> @date($transaction->document->due_at)
{{ $transaction->document->contact_name }} </td>
</td>
@endif
@if (!$hideReletadDocumentDate) <td class="price" style="color:#525f7f; font-size:13px;">
<td class="price"> @money($transaction->document->amount, $transaction->document->currency_code, true)
@date($transaction->document->due_at) </td>
</td>
@endif
@if (!$hideReletadDocumentAmount) <td class="total" style="color:#525f7f; font-size:13px;">
<td class="price"> @money($transaction->amount, $transaction->currency_code, true)
@money($transaction->document->amount, $transaction->document->currency_code, true) </td>
</td> </tr>
@endif </tbody>
</table>
@if (!$hideReletadAmount)
<td class="total">
@money($transaction->amount, $transaction->currency_code, true)
</td>
@endif
</tr>
</tbody>
</table>
</div>
</div>
</div>
@else @else
<div class="row mt-3 mb-3"> <table>
<p class="text-right"> <tr>
{{ trans('invoices.overdue_revenue') }}: <td style="padding-bottom:0; font-size:14px;">
<strong style="font-weight: bold;"> <p style="margin-bottom:0; font-size:14px;">
@money($transaction->amount, $transaction->currency_code, true) {{ trans('invoices.overdue_revenue') }}: <strong style="font-weight: bold;">@money($transaction->amount, $transaction->currency_code, true)</strong>
</strong> </p>
</p> </td>
</div> </tr>
</table>
@endif @endif
@endif @endif