mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 07:34:35 -04:00
Fixes for AR Summary reports
This commit is contained in:
parent
402b725909
commit
b1e0718a89
@ -44,12 +44,12 @@ class Handler extends ExceptionHandler
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
PDOException::class,
|
// PDOException::class,
|
||||||
MaxAttemptsExceededException::class,
|
// MaxAttemptsExceededException::class,
|
||||||
CommandNotFoundException::class,
|
// CommandNotFoundException::class,
|
||||||
ValidationException::class,
|
// ValidationException::class,
|
||||||
ModelNotFoundException::class,
|
// ModelNotFoundException::class,
|
||||||
NotFoundHttpException::class,
|
// NotFoundHttpException::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $selfHostDontReport = [
|
protected $selfHostDontReport = [
|
||||||
|
@ -100,8 +100,6 @@ class ARDetailReport extends BaseExport
|
|||||||
|
|
||||||
$query = $this->filterByClients($query);
|
$query = $this->filterByClients($query);
|
||||||
|
|
||||||
$this->csv->insertOne($this->buildHeader());
|
|
||||||
|
|
||||||
$query->cursor()
|
$query->cursor()
|
||||||
->each(function ($invoice) {
|
->each(function ($invoice) {
|
||||||
$this->csv->insertOne($this->buildRow($invoice));
|
$this->csv->insertOne($this->buildRow($invoice));
|
||||||
|
@ -122,7 +122,10 @@ class ARSummaryReport extends BaseExport
|
|||||||
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
|
->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL])
|
||||||
->where('balance', '>', 0)
|
->where('balance', '>', 0)
|
||||||
->where('is_deleted', 0)
|
->where('is_deleted', 0)
|
||||||
->where('due_date', '<', now()->startOfDay())
|
->where(function ($query){
|
||||||
|
$query->where('due_date', '<', now()->startOfDay())
|
||||||
|
->orWhereNull('due_date');
|
||||||
|
})
|
||||||
->sum('balance');
|
->sum('balance');
|
||||||
|
|
||||||
return Number::formatMoney($amount, $this->client);
|
return Number::formatMoney($amount, $this->client);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user