Payment show and pdf fixed..
This commit is contained in:
parent
fcc8d4f29a
commit
293a659f22
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
10
resources/views/purchases/payments/print_default.blade.php
Normal file
10
resources/views/purchases/payments/print_default.blade.php
Normal 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
|
Loading…
x
Reference in New Issue
Block a user