@extends('Layouts.report') @section('content')
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ trans('main.type') }} | {{ trans('main.sales_invoice') }} | {{ trans('main.return_invoice') }} | {{ trans('main.sales_agent') }} | {{ trans('main.date') }} | {{ trans('main.item') }} | {{ trans('main.caliber') }} | {{ trans('main.weight') }} | {{ trans('main.price') }} | {{ trans('main.vat') }} | {{ trans('main.grand_total') }} | ||||||
@if($row->type == 1) {{ trans('main.sales_invoice') }} @elseif($row->type == 2) {{ trans('main.notice_creditor') }} @elseif($row->type == 3) {{ trans('main.notice_debtor') }} @else {{ trans('main.return_invoice') }} @endif | {{ $row->s_m_id }} | {{ $row->r_m_id ?? 0 }} | {{ $row->sales_agent_name ?? '' }} | {{ $row->invoice_date }} | {{ $row->sub_category_title }} | {{ $row->category_id }} | @if( in_array($row->type , [1,3])){{ $row->weight }} | {{ fix_number($row->price , 1) }} | {{ fix_number($row->total_vat , 1) }} | {{ fix_number($row->grand_total , 1) }} | @else( {{ $row->weight }} ) | ( {{ fix_number($row->price , 1) }} ) | ( {{ fix_number($row->total_vat , 1) }} ) | ( {{ fix_number($row->grand_total , 1) }} ) | @endif- | {{ trans('main.total') }} | - | - | - | - | - | {{ ( collect($data['data'])->where('sumtion' , 1)->sum('weight') - collect($data['data'])->where('sumtion' , 2)->sum('weight') ) }} | {{ fix_number( ( collect($data['data'])->where('sumtion' , 1)->sum('price') - collect($data['data'])->where('sumtion' , 2)->sum('price') ), 1) }} | {{ fix_number( ( collect($data['data'])->where('sumtion' , 1)->sum('total_vat') - collect($data['data'])->where('sumtion' , 2)->sum('total_vat') ), 1) }} | {{ fix_number( ( collect($data['data'])->where('sumtion' , 1)->sum('grand_total') - collect($data['data'])->where('sumtion' , 2)->sum('grand_total') ), 1) }} |