Merge pull request #11489 from Godmartinz/bug/sc-19333/expiring-assets-report-email-content-ordering
Fixed the order expiring assets are listed in notifications
This commit is contained in:
commit
7fa9214beb
1 changed files with 4 additions and 4 deletions
|
@ -700,10 +700,10 @@ class Asset extends Depreciable
|
||||||
->whereNotNull('warranty_months')
|
->whereNotNull('warranty_months')
|
||||||
->whereNotNull('purchase_date')
|
->whereNotNull('purchase_date')
|
||||||
->whereNull('deleted_at')
|
->whereNull('deleted_at')
|
||||||
->whereRaw(\DB::raw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH) <= DATE(NOW() + INTERVAL '
|
->whereRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH) <= DATE(NOW() + INTERVAL '
|
||||||
. $days
|
. $days
|
||||||
. ' DAY) AND DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) > NOW()'))
|
. ' DAY) AND DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) > NOW()')
|
||||||
->orderBy('purchase_date', 'ASC')
|
->orderByRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH)')
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue