@extends('layouts.default') @section('title',trans('customers.collection_center')) @section('content')
{{ Form::textGroup('almost_due_at', 'Date', 'calendar',['id' => 'almost_due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '', 'onchange'=>'$("#changeForm").submit()'],Date::now()->format($date_format) ,'col-md-3') }}
Customer Name
Balance
Days Almost Due
PHONE
Notes/Warnings
@foreach($customer_almostdue as $customer_list) @if(!($customer_list->invoices->isEmpty()))
{{ $customer_list->invoices[0]->customer_name_with_parent }}
{{ isset($customer_list->invoicesum)?$customer_list->invoicesum:0 }}
/
@foreach ($customer_list->invoices as $invoice) @php $from_date = Carbon::parse($invoice->due_at); $tenth = strtotime("+10 day"); $tenthday = date('Y-m-d',$tenth); $tenthday = Carbon::parse($tenthday); $overDueDays = $from_date->diffInDays($tenthday); $paid_payment = App\Models\Accounts\Income\Invoice::with('payments_total')->where('id',$invoice->id)->first(); if (!($paid_payment->payments_total->isEmpty())){ $balance_payment = $invoice->amount - $paid_payment->payments_total[0]->paid_amount; }else{ $balance_payment = $invoice->amount; } @endphp
Invoice #{{ $invoice->invoice_number }}
@money($balance_payment,'USD',true)
{{ $overDueDays }}
{{ $invoice->customer_phone }}
@endforeach
@endif @endforeach
{{ Form::textGroup('almost_due_at', 'Date', 'calendar',['id' => 'almost_due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => '', 'onchange'=>'$("#changeForm").submit()'],Date::now()->format($date_format) ,'col-md-3') }}
Customer Name
Balance
Days Over Due
PHONE
Notes/Warnings
@foreach($customers as $k => $customer) @if(!($customer->invoices->isEmpty()))
{{ $customer->invoices[0]->customer_name_with_parent }}
@money(100, 'USD', true)
/
@php $payments_total_hidden = 0; @endphp @foreach ($customer->invoices as $invoice) @php $from_date = Carbon::parse($invoice->due_at); $to_date = Carbon::now(); $overDueDays = $from_date->diffInDays($to_date); $paid_payment = App\Models\Accounts\Income\Invoice::with('payments_total')->where('id',$invoice->id)->first(); if (!($paid_payment->payments_total->isEmpty())){ $balance_payment = $invoice->amount - $paid_payment->payments_total[0]->paid_amount; }else{ $balance_payment = $invoice->amount; } $payments_total_hidden += $balance_payment; @endphp
Invoice #{{ $invoice->invoice_number }}
@money($balance_payment,'USD',true)
{{ $overDueDays }}
{{ isset($invoice->customer_phone)?$invoice->customer_phone:'' }}
@endforeach
@endif @endforeach
@endsection @push('scripts') @endpush