mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:14:31 -04:00
add auto bill options for reports
This commit is contained in:
parent
985f2c7dbb
commit
14ae0900ae
@ -168,6 +168,7 @@ class BaseExport
|
|||||||
'tax_rate2' => 'invoice.tax_rate2',
|
'tax_rate2' => 'invoice.tax_rate2',
|
||||||
'tax_rate3' => 'invoice.tax_rate3',
|
'tax_rate3' => 'invoice.tax_rate3',
|
||||||
'recurring_invoice' => 'invoice.recurring_id',
|
'recurring_invoice' => 'invoice.recurring_id',
|
||||||
|
'auto_bill' => 'invoice.auto_bill_enabled',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected array $recurring_invoice_report_keys = [
|
protected array $recurring_invoice_report_keys = [
|
||||||
@ -208,6 +209,9 @@ class BaseExport
|
|||||||
'tax_rate1' => 'recurring_invoice.tax_rate1',
|
'tax_rate1' => 'recurring_invoice.tax_rate1',
|
||||||
'tax_rate2' => 'recurring_invoice.tax_rate2',
|
'tax_rate2' => 'recurring_invoice.tax_rate2',
|
||||||
'tax_rate3' => 'recurring_invoice.tax_rate3',
|
'tax_rate3' => 'recurring_invoice.tax_rate3',
|
||||||
|
'auto_bill' => 'recurring_invoice.auto_bill',
|
||||||
|
'auto_bill_enabled' => 'recurring_invoice.auto_bill_enabled',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
protected array $purchase_order_report_keys = [
|
protected array $purchase_order_report_keys = [
|
||||||
@ -287,6 +291,7 @@ class BaseExport
|
|||||||
'is_amount_discount' => 'item.is_amount_discount',
|
'is_amount_discount' => 'item.is_amount_discount',
|
||||||
'line_total' => 'item.line_total',
|
'line_total' => 'item.line_total',
|
||||||
'gross_line_total' => 'item.gross_line_total',
|
'gross_line_total' => 'item.gross_line_total',
|
||||||
|
'tax_amount' => 'item.tax_amount',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected array $quote_report_keys = [
|
protected array $quote_report_keys = [
|
||||||
|
@ -147,6 +147,10 @@ class InvoiceExport extends BaseExport
|
|||||||
$entity['invoice.recurring_id'] = $invoice->recurring_invoice->number ?? '';
|
$entity['invoice.recurring_id'] = $invoice->recurring_invoice->number ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_array('invoice.auto_bill_enabled', $this->input['report_keys'])) {
|
||||||
|
$entity['invoice.auto_bill_enabled'] = $invoice->auto_bill_enabled ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
@ -153,6 +153,10 @@ class RecurringInvoiceExport extends BaseExport
|
|||||||
$entity['recurring_invoice.frequency_id'] = $invoice->frequencyForKey($invoice->frequency_id);
|
$entity['recurring_invoice.frequency_id'] = $invoice->frequencyForKey($invoice->frequency_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (in_array('recurring_invoice.auto_bill_enabled', $this->input['report_keys'])) {
|
||||||
|
$entity['recurring_invoice.auto_bill_enabled'] = $invoice->auto_bill_enabled ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
|
}
|
||||||
|
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class PreviewReport implements ShouldQueue
|
|||||||
else
|
else
|
||||||
$report = $export->run();
|
$report = $export->run();
|
||||||
|
|
||||||
// nlog($report);
|
nlog($report);
|
||||||
|
|
||||||
Cache::put($this->hash, $report, 60 * 60);
|
Cache::put($this->hash, $report, 60 * 60);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user