Bug fixes

This commit is contained in:
Hillel Coren 2016-01-13 11:09:00 +02:00
parent 8cefa9a707
commit ac58df4441
2 changed files with 10 additions and 7 deletions

View File

@ -18,6 +18,7 @@ class InvoiceListener
return;
}
if (Auth::check()) {
$invoice = $event->invoice;
$account = Auth::user()->account;
@ -27,6 +28,7 @@ class InvoiceListener
$account->save();
}
}
}
public function updatedInvoice(InvoiceWasUpdated $event)
{

View File

@ -513,6 +513,7 @@ class Invoice extends EntityModel implements BalanceAffecting
$dueDateVal = strtotime($this->due_date);
$monthVal = (int)date('n', $dueDateVal);
$dayVal = (int)date('j', $dueDateVal);
$dueDate = false;
if($monthVal == 1) {// January; day of month
$currentDay = (int)date('j', $now);