Payment show and pdf fixed..

This commit is contained in:
Cüneyt Şentürk 2021-06-28 18:38:56 +03:00
parent fcc8d4f29a
commit 293a659f22
3 changed files with 14 additions and 3 deletions

View File

@ -393,7 +393,8 @@ class Transaction extends Model
public function getTemplatePathAttribute($value = null)
{
return $value ?: 'sales.revenues.print_default';
$type_for_theme = ($this->type == 'income') ? 'sales.revenues.print_default' : 'purchases.payments.print_default';
return $value ?: $type_for_theme;
}
/**

View File

@ -5,8 +5,8 @@
@if (!$hideCompanyLogo)
<td style="width:5%;" valign="top">
@stack('company_logo_start')
@if (!empty($document->contact->logo) && !empty($document->contact->logo->id))
<img src="{{ Storage::url($document->contact->logo->id) }}" height="128" width="128" alt="{{ $document->contact_name }}" />
@if (!empty($transaction->contact->logo) && !empty($transaction->contact->logo->id))
<img src="{{ Storage::url($transaction->contact->logo->id) }}" height="128" width="128" alt="{{ $transaction->contact_name }}" />
@else
<img src="{{ $logo }}" alt="{{ setting('company.name') }}" />
@endif

View File

@ -0,0 +1,10 @@
@extends('layouts.print')
@section('title', trans_choice('general.payments', 1) . ': ' . $payment->id)
@section('content')
<x-transactions.template.ddefault
type="payment"
:transaction="$payment"
/>
@endsection