mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 17:24:36 -04:00
Working on export
This commit is contained in:
parent
73a164be5c
commit
e899be7c55
@ -198,7 +198,7 @@ class ExportController extends BaseController
|
||||
if ($request->input('include') === 'all' || $request->input('invoices')) {
|
||||
$data['invoices'] = Invoice::scope()
|
||||
->invoiceType(INVOICE_TYPE_STANDARD)
|
||||
->with('user', 'client.contacts', 'invoice_status')
|
||||
->with('user', 'client.contacts', 'invoice_status', 'invoice_items')
|
||||
->withArchived()
|
||||
->where('is_recurring', '=', false)
|
||||
->get();
|
||||
@ -207,7 +207,7 @@ class ExportController extends BaseController
|
||||
if ($request->input('include') === 'all' || $request->input('quotes')) {
|
||||
$data['quotes'] = Invoice::scope()
|
||||
->invoiceType(INVOICE_TYPE_QUOTE)
|
||||
->with('user', 'client.contacts', 'invoice_status')
|
||||
->with('user', 'client.contacts', 'invoice_status', 'invoice_items')
|
||||
->withArchived()
|
||||
->where('is_recurring', '=', false)
|
||||
->get();
|
||||
@ -216,7 +216,7 @@ class ExportController extends BaseController
|
||||
if ($request->input('include') === 'all' || $request->input('recurring')) {
|
||||
$data['recurringInvoices'] = Invoice::scope()
|
||||
->invoiceType(INVOICE_TYPE_STANDARD)
|
||||
->with('user', 'client.contacts', 'invoice_status', 'frequency')
|
||||
->with('user', 'client.contacts', 'invoice_status', 'frequency', 'invoice_items')
|
||||
->withArchived()
|
||||
->where('is_recurring', '=', true)
|
||||
->get();
|
||||
|
@ -25,37 +25,40 @@
|
||||
@if ($account->custom_invoice_text_label2)
|
||||
<td>{{ $account->custom_invoice_text_label2 }}</td>
|
||||
@endif
|
||||
<td>{{ trans('texts.product') }}</td>
|
||||
</tr>
|
||||
|
||||
@foreach ($invoices as $invoice)
|
||||
@if (!$invoice->client->is_deleted)
|
||||
<tr>
|
||||
<td>{{ $invoice->present()->client }}</td>
|
||||
<td>{{ $invoice->present()->email }}</td>
|
||||
@if ($multiUser)
|
||||
<td>{{ $invoice->present()->user }}</td>
|
||||
@endif
|
||||
<td>{{ $invoice->invoice_number }}</td>
|
||||
<td>{{ $account->formatMoney($invoice->amount, $invoice->client) }}</td>
|
||||
<td>{{ $account->formatMoney($invoice->amount - $invoice->balance, $invoice->client) }}</td>
|
||||
<td>{{ $invoice->po_number }}</td>
|
||||
<td>{{ $invoice->present()->status }}</td>
|
||||
<td>{{ $invoice->present()->invoice_date }}</td>
|
||||
<td>{{ $invoice->present()->due_date }}</td>
|
||||
<td>{{ $invoice->public_notes }}</td>
|
||||
<td>{{ $invoice->private_notes }}</td>
|
||||
@if ($account->custom_invoice_label1)
|
||||
<td>{{ $invoice->custom_value1 }}</td>
|
||||
@endif
|
||||
@if ($account->custom_invoice_label2)
|
||||
<td>{{ $invoice->custom_value2 }}</td>
|
||||
@endif
|
||||
@if ($account->custom_invoice_label1)
|
||||
<td>{{ $invoice->custom_text_value1 }}</td>
|
||||
@endif
|
||||
@if ($account->custom_invoice_label2)
|
||||
<td>{{ $invoice->custom_text_value2 }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@foreach ($invoice->invoice_items as $item)
|
||||
<tr>
|
||||
<td>{{ $invoice->present()->client }}</td>
|
||||
<td>{{ $invoice->present()->email }}</td>
|
||||
@if ($multiUser)
|
||||
<td>{{ $invoice->present()->user }}</td>
|
||||
@endif
|
||||
<td>{{ $invoice->invoice_number }}</td>
|
||||
<td>{{ $account->formatMoney($invoice->amount, $invoice->client) }}</td>
|
||||
<td>{{ $account->formatMoney($invoice->amount - $invoice->balance, $invoice->client) }}</td>
|
||||
<td>{{ $invoice->po_number }}</td>
|
||||
<td>{{ $invoice->present()->status }}</td>
|
||||
<td>{{ $invoice->present()->invoice_date }}</td>
|
||||
<td>{{ $invoice->present()->due_date }}</td>
|
||||
<td>{{ $invoice->public_notes }}</td>
|
||||
<td>{{ $invoice->private_notes }}</td>
|
||||
@if ($account->custom_invoice_label1)
|
||||
<td>{{ $invoice->custom_value1 }}</td>
|
||||
@endif
|
||||
@if ($account->custom_invoice_label2)
|
||||
<td>{{ $invoice->custom_value2 }}</td>
|
||||
@endif
|
||||
@if ($account->custom_invoice_label1)
|
||||
<td>{{ $invoice->custom_text_value1 }}</td>
|
||||
@endif
|
||||
@if ($account->custom_invoice_label2)
|
||||
<td>{{ $invoice->custom_text_value2 }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
Loading…
x
Reference in New Issue
Block a user