{{ $invoice->number }} @if($invoice->movement_type == 'sales_invoice') @lang('dashboard_invoices.invoice') @elseif($invoice->movement_type == 'sales_refund') @lang('dashboard_invoices.refund') @elseif($invoice->movement_type == 'price_offer') @lang('dashboard_invoices.register_quote') @elseif($invoice->movement_type == 'sales_order') @lang('dashboard_invoices.sale_order') @elseif($invoice->movement_type == 'voucher_cash') @lang('dashboard_invoices.cash_sales') @elseif($invoice->movement_type == 'sales_advance_payment') @lang('dashboard_invoices.down_payment') @endif

{{ $invoice->number }} @lang('dashboard_sales_expenses.'.$invoice->movement_type) @lang('dashboard_invoices.number') #

logo

@if ($invoice->movement_type != 'sales_invoice' && $invoice->movement_type != 'price_offer')
@if($invoice->movement_type == 'pay_sales_invoice') @lang('dashboard_sales_expenses.paid_from')
@else @lang('dashboard_sales_expenses.pay_to')
@endif {{$invoice->client->name}}
@else
@endif @if ($invoice->shipping_address != null)
{{-- @if($invoice->movement_type != 'price_offer') text-right @else text-right @endif --}}
@lang('dashboard_sales_expenses.shipping_to')
{{$invoice->shipping_address}}
@endif
@lang('dashboard_sales_expenses.payment_method')
{{ $invoice->payment_type ?? "N/A" }}
@lang('dashboard_sales_expenses.order_date')
{{ $invoice->invoice_date }}

@lang('dashboard_sales_expenses.invoice_details')

@if ($invoice->movement_type == 'notice_credit') @foreach ($invoice->account as $index => $account) {{-- {{ dd($product) }} --}} @endforeach @elseif ($invoice['movement_type'] == 'sales_advance_payment') @foreach ($invoice['payment'] as $index => $payment) @endforeach @else @php $indexer = 0; @endphp @foreach ($invoice->product as $index => $product) {{-- {{ dd($product) }} --}} @endforeach @foreach ($invoice->service as $index => $service) {{-- {{ dd($service) }} --}} @endforeach @endif
@lang('dashboard_invoices.number'). @if ($invoice->movement_type == 'notice_credit') @lang('dashboard_invoices.account') @elseif ($invoice['movement_type'] == 'sales_advance_payment') @lang('dashboard_invoices.description') @else @lang('dashboard_invoices.product') @endif @lang('dashboard_invoices.price')
{{ $index +1 }} {{ $account->name }} $ {{ $invoice->account[$index]->pivot->total }}
{{ $index +1 }} {{ $payment->description }} $ {{ $payment->price }}
{{ $indexer +=1 }} {{ $product->name }} $ {{ $invoice->product[$index]->pivot->total }}
{{ $indexer+=1 }} {{ $service->name }} $ {{ $invoice->service[$index]->pivot->total }}
Sub Total $ {{ $invoice->balance_before_discount }}
@lang('dashboard_invoices.total')

${{ $invoice->invoice_total }}

@if ($invoice->movement_type == 'pay_sales_invoice')

{{$invoice->paid}} : @lang('dashboard_sales_expenses.paid_amount')

@endif