From 9168372f4deee3d40e4030f0c9df772f90aa380e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 7 May 2017 17:10:01 +0300 Subject: [PATCH] Don't push due date to next month if on the same day --- app/Models/Invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index de4cd74ca4..1e36899709 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -1034,7 +1034,7 @@ class Invoice extends EntityModel implements BalanceAffecting $dueDay = $lastDayOfMonth; } - if ($currentDay >= $dueDay) { + if ($currentDay > $dueDay) { // Wait until next month // We don't need to handle the December->January wraparaound, since PHP handles month 13 as January of next year $dueMonth++;