styling transaction and transfer templates

This commit is contained in:
Denis Duliçi
2022-07-22 01:27:25 +03:00
parent 8f483ebb6b
commit 7886355a50
4 changed files with 111 additions and 95 deletions

View File

@ -1,5 +1,5 @@
<div class="print-template">
<table class="border-bottom-1" style="width: 100%;">
<table class="border-bottom-1">
<tbody>
<tr>
<td style="width: 60%; padding: 0 0 15px 0;">
@ -9,11 +9,11 @@
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.account_name') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.account_name') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_account->name }}
</td>
</tr>
@ -21,57 +21,63 @@
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.number') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.number') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_account->number }}
</td>
</tr>
</table>
@if (! empty($transfer->expense_account->bank_name))
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.bank_name') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.bank_name') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_account->bank_name }}
</td>
</tr>
</table>
@endif
@if (! empty($transfer->expense_account->bank_phone))
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('general.phone') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.phone') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_account->bank_phone }}
</td>
</tr>
</table>
@endif
@if (! empty($transfer->expense_account->bank_address))
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('general.address') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.address') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_account->bank_address }}
</td>
</tr>
</table>
@endif
</td>
</tr>
</tbody>
</table>
<table class="border-bottom-1" style="width: 100%; margin-top:15px;">
<table class="border-bottom-1" style="margin-top:15px;">
<tbody>
<tr>
<td style="width: 60%; padding: 0 0 15px 0;">
@ -81,11 +87,11 @@
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.account_name') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.account_name') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->income_account->name }}
</td>
</tr>
@ -93,57 +99,63 @@
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.number') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.number') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->income_account->number }}
</td>
</tr>
</table>
@if (! empty($transfer->income_account->bank_name))
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.bank_name') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('accounts.bank_name') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->income_account->bank_name }}
</td>
</tr>
</table>
@endif
@if (! empty($transfer->income_account->bank_phone))
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('general.phone') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.phone') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->income_account->bank_phone }}
</td>
</tr>
</table>
@endif
@if (! empty($transfer->income_account->bank_address))
<table>
<tr>
<td style="width:30%; margin: 0px; padding: 0 0 8px 0; font-size: 12px; font-weight:600;">
{{ trans('general.address') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.address') }}
</td>
<td style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->income_account->bank_address }}
</td>
</tr>
</table>
@endif
</td>
</tr>
</tbody>
</table>
<table style="width: 100%; margin-top:15px;">
<table style="margin-top:15px;">
<tr>
<td style="padding:0 0 15px 0;">
<h2 class="text-left text-uppercase" style="font-size: 14px; font-weight:600;">
@ -153,23 +165,23 @@
</tr>
</table>
<table>
<table class="border-bottom-1" style="padding-bottom:15px;">
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 0 4px 8px 0; font-size: 12px; font-weight:600;">
{{ trans('general.date') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.date') }}
</td>
<td valign="top" style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
<x-date date="{{ $transfer->expense_transaction->paid_at}}" />
</td>
</tr>
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 0 4px 8px 0; font-size: 12px; font-weight:600;">
{{ trans_choice('general.payment_methods', 1) }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans_choice('general.payment_methods', 1) }}
</td>
<td valign="top" style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
@if (! empty($payment_methods[$transfer->expense_transaction->payment_method]))
{!! $payment_methods[$transfer->expense_transaction->payment_method] !!}
@else
@ -179,33 +191,37 @@
</tr>
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 0 4px 8px 0; font-size: 12px; font-weight:600;">
{{ trans('general.reference') }}:
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.reference') }}
</td>
<td valign="top" style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_transaction->reference }}
</td>
</tr>
<tr>
<td valign="top" style="width: 30%; margin: 0px; padding: 0 4px 8px 0; font-size: 12px; font-weight:600;">
<td valign="top" style="width: 30%; margin: 0px; padding: 8px 4px 0 0; font-size: 12px; font-weight:600;">
{{ trans('general.description') }}
</td>
<td valign="top" style="width:70%; margin: 0px; padding: 0 0 8px 0; font-size: 12px;">
<td valign="top" valign="top" class="border-bottom-dashed-black" style="width:70%; margin: 0px; padding: 8px 0 0 0; font-size: 12px;">
{{ $transfer->expense_transaction->description }}
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
<table style="text-align: right;">
<table style="text-align: right; margin-top:55px;">
<tr>
<td valign="center" style="width:80%; display:block; float:right; background-color: #55588B; -webkit-print-color-adjust: exact; color:#ffffff; border-radius: 5px;">
<table>
<tr>
<td valign="center" style="width: 80%; padding:0; font-size: 14px; font-weight:600; color:#ffffff;">
{{ trans('general.amount') }}:
{{ trans('general.amount') }}
</td>
<td valign="center" style="width: 20%; padding:0; font-size: 14px; color:#ffffff;">