@extends('admin.layout.master') @section('title', $printData['invoice']->invoice_no) @section('custom_style') @endsection @section('content')
{{__('obs.print_preview')}}
{!! $print['head'] !!}
@php $tot_qty = 0; $invoice = $printData['invoice']; $franction_digit = $print_settings['fraction_digit']; $transactions = $print_settings["show_zero_qty"]?$invoice->transactions:$invoice->transactions->where('quantity', '>', 0); @endphp @foreach ($transactions as $i=> $item) @php $tot_qty += $item->quantity; @endphp @endforeach
{{__('obs.sl')}} {{__('obs.name')}} {{__('obs.note')}} {{__('obs.unit')}} {{__('obs.quantity')}}
{{ $i+1 }} {{ $item->product->name_eng ?? '' }} {{ $item->description ?? '' }} {{ $item->product->primaryUnit->name ?? '' }} {{ number_format($item->quantity, 2) }}
{{__('obs.total')}} {{ number_format($tot_qty, 2) }}
{{--
@php use Salla\ZATCA\GenerateQrCode; use Salla\ZATCA\Tags\InvoiceDate; use Salla\ZATCA\Tags\InvoiceTaxAmount; use Salla\ZATCA\Tags\InvoiceTotalAmount; use Salla\ZATCA\Tags\Seller; use Salla\ZATCA\Tags\TaxNumber; @endphp @if ($print_settings["show_qr_code"] || $print_settings["in_words"]->show)
@php $qr_code = GenerateQrCode::fromArray([ new Seller(store_info()->name_local), new TaxNumber(store_info()->vat_reg_no), new InvoiceDate($invoice->date), new InvoiceTotalAmount(round($invoice->net_total)), new InvoiceTaxAmount($invoice->total_vat) ])->render(); @endphp
@if ($print_settings["show_qr_code"])
QR Code
@endif @if ($print_settings["in_words"]->show)

{{ $print_settings["in_words"]->label }} : @if($invoice->net_total < 0)(Minus)@endif {{ ucwords(getNumberInWords(abs($invoice->net_total))) }}.

@endif
@endif @if ($print_settings["show_party_balance"]->show)
@php $opening_balance = ledgerWiseValue([$invoice->party_id=> $invoice->party->account_id], $invoice->date) @endphp
{{ $print_settings["show_party_balance"]->label }}
{{__('obs.opening')}} {{ getFormatedAmount($franction_digit, $opening_balance) }}
{{__('obs.closing')}} {{ getFormatedAmount($franction_digit, ($opening_balance + (round($invoice->net_total, 2) - $invoice->total_recv_amount))) }}
@endif @if ($print_settings["total_summary"])
@php $table_Settings = $print_settings->where('show', '<>', null)->where('type', 2)->sortBy('serial'); $tbody = $table_Settings->map(function($q) use($franction_digit) { if ($q->key == 'due') { return ' '.$q->label.' {{ number_format(round($item["net_total"] - $item["total_recv_amount"], '.$franction_digit.'), '.$franction_digit.', ".", "") }} '; } else { if (isset($q->fraction)) { return ' '.$q->label.' {{ number_format(round($item["'.$q->key.'"], '.$franction_digit.'), '.$franction_digit.', ".", "") }} '; } else { return ' '.$q->label.' {{ $item["'.$q->key.'"] }} '; } } }); $tbody = implode(' ', $tbody->toArray()); @endphp {!! newBladeStringCompiler($tbody, $invoice->toArray()) !!}
@endif
--}}
{!! $print['foot'] !!}
@if (request()->is_approve == 1 && $printData['invoice']->warehouse_id != current_store() && $printData['invoice']->approve_status != 1) @endif
@endsection @section('script') @endsection