1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

Fix for vendor export

This commit is contained in:
Hillel Coren 2016-09-19 09:59:31 +03:00
parent 4ec29bf5f2
commit 2657a3d31f
3 changed files with 30 additions and 36 deletions

View File

@ -45,4 +45,14 @@
@include('export.payments')
@endif
@if (isset($vendors) && $vendors && count($vendors))
<tr><td>{{ strtoupper(trans('texts.vendors')) }}</td></tr>
@include('export.vendors')
@endif
@if (isset($vendors_contacts) && $vendors_contacts && count($vendors_contacts))
<tr><td>{{ strtoupper(trans('texts.vendors_contacts')) }}</td></tr>
@include('export.vendors_contacts')
@endif
</html>

View File

@ -9,17 +9,17 @@
<td>{{ trans('texts.phone') }}</td>
</tr>
@foreach ($contacts as $contact)
@if (!$contact->client->is_deleted)
@foreach ($vendor_contacts as $contact)
@if (!$vendor_contact->vendor->is_deleted)
<tr>
<td>{{ $contact->client->getDisplayName() }}</td>
<td>{{ $vendor_contact->vendor->getDisplayName() }}</td>
@if ($multiUser)
<td>{{ $contact->user->getDisplayName() }}</td>
<td>{{ $vendor_contact->user->getDisplayName() }}</td>
@endif
<td>{{ $contact->first_name }}</td>
<td>{{ $contact->last_name }}</td>
<td>{{ $contact->email }}</td>
<td>{{ $contact->phone }}</td>
<td>{{ $vendor_contact->first_name }}</td>
<td>{{ $vendor_contact->last_name }}</td>
<td>{{ $vendor_contact->email }}</td>
<td>{{ $vendor_contact->phone }}</td>
</tr>
@endif
@endforeach

View File

@ -3,42 +3,26 @@
@if ($multiUser)
<td>{{ trans('texts.user') }}</td>
@endif
<td>{{ trans('texts.balance') }}</td>
<td>{{ trans('texts.paid_to_date') }}</td>
<td>{{ trans('texts.address1') }}</td>
<td>{{ trans('texts.address2') }}</td>
<td>{{ trans('texts.city') }}</td>
<td>{{ trans('texts.state') }}</td>
<td>{{ trans('texts.postal_code') }}</td>
<td>{{ trans('texts.country') }}</td>
@if ($account->custom_client_label1)
<td>{{ $account->custom_client_label1 }}</td>
@endif
@if ($account->custom_client_label2)
<td>{{ $account->custom_client_label2 }}</td>
@endif
</tr>
@foreach ($clients as $client)
@foreach ($vendors as $vendor)
<tr>
<td>{{ $client->getDisplayName() }}</td>
<td>{{ $vendor->getDisplayName() }}</td>
@if ($multiUser)
<td>{{ $client->user->getDisplayName() }}</td>
@endif
<td>{{ $account->formatMoney($client->balance, $client) }}</td>
<td>{{ $account->formatMoney($client->paid_to_date, $client) }}</td>
<td>{{ $client->address1 }}</td>
<td>{{ $client->address2 }}</td>
<td>{{ $client->city }}</td>
<td>{{ $client->state }}</td>
<td>{{ $client->postal_code }}</td>
<td>{{ $client->present()->country }}</td>
@if ($account->custom_client_label1)
<td>{{ $client->custom_value1 }}</td>
@endif
@if ($account->custom_client_label2)
<td>{{ $client->custom_value2 }}</td>
<td>{{ $vendor->user->getDisplayName() }}</td>
@endif
<td>{{ $vendor->address1 }}</td>
<td>{{ $vendor->address2 }}</td>
<td>{{ $vendor->city }}</td>
<td>{{ $vendor->state }}</td>
<td>{{ $vendor->postal_code }}</td>
<td>{{ $vendor->present()->country }}</td>
</tr>
@endforeach