@extends('layouts.business.pdf.pdf_layout') @section('pdf_title') @endsection @section('pdf_title')
|
@php
$defaultLogo = public_path('assets/images/default.svg');
$customLogo = public_path(
get_business_option('business-settings')['a4_invoice_logo'] ?? 'assets/images/default.svg',
);
$logoPath = file_exists($customLogo) ? $customLogo : $defaultLogo;
$logoData = base64_encode(file_get_contents($logoPath));
$logoType = pathinfo($logoPath, PATHINFO_EXTENSION);
$src = 'data:image/' . $logoType . ';base64,' . $logoData;
@endphp
@if ((get_business_option('business-settings')['show_a4_invoice_logo'] ?? 0) == 1)
|
@if (($sale->business->meta['show_address'] ?? 0) == 1)
{{ __('Address') }} : {{ $sale->branch?->address ?? ($sale->business?->address ?? '') }}
@endif
@if (($sale->business->meta['show_phone_number'] ?? 0) == 1)
{{ __('Mobile') }} : {{ $sale->branch?->phone ?? ($sale->business?->phoneNumber ?? '') }}
@endif
@if (($sale->business->meta['show_email'] ?? 0) == 1)
{{ __('Email') }} : {{ $sale->branch?->email ?? ($sale->business?->email ?? '') }}
@endif
@if (($sale->business->meta['show_vat'] ?? 0) == 1)
{{ $sale->business->vat_name }}
@endif
{{ ($sale->business->meta['show_vat'] ?? 0) == 1 && ($sale->business->meta['show_vat'] ?? 0) == 1 ? ':' : '' }}
@if (($sale->business->meta['show_vat'] ?? 0) == 1)
{{ $sale->business->vat_no ?? '' }}
@endif
|
|
{{ __('Customer') }} : {{ $sale->party->name ?? __('Guest') }}
{{ __('Address') }} : {{ $sale->party->address ?? '' }}
{{ __('Phone') }} : {{ $sale->party->phone ?? __('Guest') }}
{{ __('Remarks') }} : {{ $sale->meta['note'] ?? 'N/A' }}
|
{{ __('Invoice No') }} : {{ $sale->invoiceNumber ?? '' }}
{{ __('Date') }} : {{ formatted_date($sale->saleDate ?? '') }}
{{ __('Time') }} : {{ formatted_time($sale->saleDate ?? '') }}
{{ __('Sales By') }} :
{{ $sale->user->role != 'staff' ? __('Admin') : $sale->user->name }}
|
| {{ __('SL') }} | {{ __('Item') }} | {{ __('Quantity') }} | @if ($hasWarranty){{ __('Warranty') }} | @endif @if ($hasGuarantee){{ __('Guarantee') }} | @endif{{ __('Unit Price') }} | {{ __('Discount') }} | {{ __('Total Price') }} |
|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $detail->product->productName ?? '' }} {{ !empty($detail->stock?->batch_no) ? ' (' . $detail->stock->batch_no . ')' : '' }} | {{ $qty }} | @if ($hasWarranty){{ $info['warranty_duration'] ?? '' }} {{ $info['warranty_unit'] ?? '' }} | @endif @if ($hasGuarantee){{ $info['guarantee_duration'] ?? '' }} {{ $info['guarantee_unit'] ?? '' }} | @endif{{ currency_format($price, currency: business_currency()) }} | {{ currency_format($discount, currency: business_currency()) }} | {{ currency_format($productTotal, currency: business_currency()) }} |
|
|
||||||||||||||||||||||||||||||||||
| {{ __('SL') }} | {{ __('Date') }} | {{ __('Returned Item') }} | {{ __('Quantity') }} | {{ __('Total Amount') }} |
|---|---|---|---|---|
| {{ $row_counter }} | {{ formatted_date($return->return_date) }} | {{ $detail->saleDetail->product->productName ?? '' }} {{ $detail->saleDetail?->stock?->batch_no ? '(' . $detail->saleDetail?->stock?->batch_no . ')' : '' }} | {{ $detail->return_qty }} | {{ currency_format($detail->return_amount, currency: business_currency()) }} |
| {{ amountInWords($total_return_amount) }} | |||||||||||||
| {{ __('Paid by') }} : {{ $returnTransactionType ?? ($sale->paymentType ?? '') }} |
|
|
{{ __('Customer Signature') }}
|
{{ __('Authorized Signature') }}
|