From df7b6abe014964d3628e9e2f6cac3edb3af8e5bc Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sat, 5 Jan 2019 23:04:55 -0600 Subject: [PATCH] industry taxes testing --- app/Library/Structures/StructureTaxHelper.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Library/Structures/StructureTaxHelper.php b/app/Library/Structures/StructureTaxHelper.php index 7cc63cef4..7c22c72a8 100644 --- a/app/Library/Structures/StructureTaxHelper.php +++ b/app/Library/Structures/StructureTaxHelper.php @@ -168,10 +168,18 @@ class StructureTaxHelper { //Create an array of dates for($i = 0; $i < $months; $i++) { + if($i == 0) { + $dates[$i]['start'] = $start; + $dates[$i]['end'] = $end; + } + + $start = Carbon::now()->startOfMonth()->subMonths($i); + $end = Carbon::now()->endOfMonth()->subMonths($i); + $end->hour = 23; + $end->minute = 59; + $end->second = 59; $dates[$i]['start'] = $start; $dates[$i]['end'] = $end; - $start = $start->subMonth(); - $end = $end->subMonth(); } //Return the dates back to the calling function