@if(!empty($for_pdf)) @endif

{{$contact->business->name}}
@if(!empty($location)) {!! $location->location_address !!} @else {!! $contact->business->business_address !!} @endif

@lang('lang_v1.to'):

{{$contact->name}}
{!! $contact->contact_address !!} @if(!empty($contact->email))
@lang('business.email'): {{$contact->email}} @endif
@lang('contact.mobile'): {{$contact->mobile}} @if(!empty($contact->tax_number))
@lang('contact.tax_no'): {{$contact->tax_number}} @endif

@lang('lang_v1.account_summary')

{{$ledger_details['start_date']}} @lang('lang_v1.to') {{$ledger_details['end_date']}}
@if( $contact->type == 'supplier' || $contact->type == 'both') @endif @if( $contact->type == 'customer' || $contact->type == 'both') @endif @if($ledger_details['ledger_discount'] > 0) @endif
@lang('lang_v1.opening_balance') @format_currency($ledger_details['beginning_balance'])
@lang('report.total_purchase') @format_currency($ledger_details['total_purchase'])
@lang('lang_v1.total_invoice') @format_currency($ledger_details['total_invoice'])
@lang('sale.total_paid') @format_currency($ledger_details['total_paid'])
@lang('lang_v1.advance_balance') @format_currency($contact->balance - $ledger_details['total_reverse_payment'])
@lang('lang_v1.ledger_discount') @format_currency($ledger_details['ledger_discount'])
@lang('lang_v1.balance_due') @format_currency($ledger_details['balance_due'] - $ledger_details['ledger_discount'])

@lang('lang_v1.ledger_table_heading', ['start_date' => $ledger_details['start_date'], 'end_date' => $ledger_details['end_date']])

{{----}} @foreach($ledger_details['ledger'] as $data) iteration % 2 == 0) class="odd" @endif> {{----}} @endforeach
@lang('lang_v1.date') @lang('purchase.ref_no') @lang('lang_v1.type') @lang('sale.location') @lang('sale.payment_status')@lang('sale.total')@lang('account.debit') @lang('account.credit') @lang('lang_v1.balance') @lang('lang_v1.payment_method') @lang('report.others')
{{@format_datetime($data['date'])}} {{$data['ref_no']}} {{$data['type']}} {{$data['location']}} {{$data['payment_status']}}@if($data['total'] !== '') @format_currency($data['total']) @endif@if($data['debit'] != '') @format_currency($data['debit']) @endif @if($data['credit'] != '') @format_currency($data['credit']) @endif {{$data['balance']}} {{$data['payment_method']}} {!! $data['others'] !!} @if(!empty($is_admin) && !empty($data['transaction_id']) && $data['transaction_type'] == 'ledger_discount')
@endif