Removed redundant functions from Invoice, optimised Invoice tables
This commit is contained in:
@@ -24,13 +24,13 @@ class AccountController extends Controller
|
||||
});
|
||||
|
||||
// Get our invoice due date for this invoice
|
||||
$io->due_date = $s->min(function($item) { return $item->invoice_next; });
|
||||
$io->due_at = $s->min(function($item) { return $item->invoice_next; });
|
||||
|
||||
// @todo The days in advance is an application parameter
|
||||
$io->date_orig = $io->due_date->subDays(30);
|
||||
$io->created_at = $io->due_at->subDays(30);
|
||||
|
||||
// Work out items to add to this invoice, plus any in the next additional days
|
||||
$days = now()->diffInDays($io->due_date)+1+7;
|
||||
$days = now()->diffInDays($io->due_at)+1+7;
|
||||
foreach ($s as $so)
|
||||
{
|
||||
if ($so->isInvoiceDueSoon($days))
|
||||
|
Reference in New Issue
Block a user