diff --git a/resources/views/export.blade.php b/resources/views/export.blade.php index 6625dee11c5a..0e42faa8f6ab 100644 --- a/resources/views/export.blade.php +++ b/resources/views/export.blade.php @@ -45,4 +45,14 @@ @include('export.payments') @endif - \ No newline at end of file + @if (isset($vendors) && $vendors && count($vendors)) + {{ strtoupper(trans('texts.vendors')) }} + @include('export.vendors') + @endif + + @if (isset($vendors_contacts) && $vendors_contacts && count($vendors_contacts)) + {{ strtoupper(trans('texts.vendors_contacts')) }} + @include('export.vendors_contacts') + @endif + + diff --git a/resources/views/export/vendor_contacts.blade.php b/resources/views/export/vendor_contacts.blade.php index b35f59045a26..42161216ee44 100644 --- a/resources/views/export/vendor_contacts.blade.php +++ b/resources/views/export/vendor_contacts.blade.php @@ -9,19 +9,19 @@ {{ trans('texts.phone') }} -@foreach ($contacts as $contact) - @if (!$contact->client->is_deleted) +@foreach ($vendor_contacts as $contact) + @if (!$vendor_contact->vendor->is_deleted) - {{ $contact->client->getDisplayName() }} + {{ $vendor_contact->vendor->getDisplayName() }} @if ($multiUser) - {{ $contact->user->getDisplayName() }} + {{ $vendor_contact->user->getDisplayName() }} @endif - {{ $contact->first_name }} - {{ $contact->last_name }} - {{ $contact->email }} - {{ $contact->phone }} + {{ $vendor_contact->first_name }} + {{ $vendor_contact->last_name }} + {{ $vendor_contact->email }} + {{ $vendor_contact->phone }} @endif @endforeach - \ No newline at end of file + diff --git a/resources/views/export/vendors.blade.php b/resources/views/export/vendors.blade.php index f0d2a05b75fe..8f6aeacb52a7 100644 --- a/resources/views/export/vendors.blade.php +++ b/resources/views/export/vendors.blade.php @@ -3,43 +3,27 @@ @if ($multiUser) {{ trans('texts.user') }} @endif - {{ trans('texts.balance') }} - {{ trans('texts.paid_to_date') }} {{ trans('texts.address1') }} {{ trans('texts.address2') }} {{ trans('texts.city') }} {{ trans('texts.state') }} {{ trans('texts.postal_code') }} {{ trans('texts.country') }} - @if ($account->custom_client_label1) - {{ $account->custom_client_label1 }} - @endif - @if ($account->custom_client_label2) - {{ $account->custom_client_label2 }} - @endif -@foreach ($clients as $client) +@foreach ($vendors as $vendor) - {{ $client->getDisplayName() }} + {{ $vendor->getDisplayName() }} @if ($multiUser) - {{ $client->user->getDisplayName() }} - @endif - {{ $account->formatMoney($client->balance, $client) }} - {{ $account->formatMoney($client->paid_to_date, $client) }} - {{ $client->address1 }} - {{ $client->address2 }} - {{ $client->city }} - {{ $client->state }} - {{ $client->postal_code }} - {{ $client->present()->country }} - @if ($account->custom_client_label1) - {{ $client->custom_value1 }} - @endif - @if ($account->custom_client_label2) - {{ $client->custom_value2 }} + {{ $vendor->user->getDisplayName() }} @endif + {{ $vendor->address1 }} + {{ $vendor->address2 }} + {{ $vendor->city }} + {{ $vendor->state }} + {{ $vendor->postal_code }} + {{ $vendor->present()->country }} @endforeach - \ No newline at end of file +