diff --git a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php index d419cf80c..518259493 100644 --- a/app/Http/Controllers/MiningTaxes/MiningTaxesController.php +++ b/app/Http/Controllers/MiningTaxes/MiningTaxesController.php @@ -178,10 +178,10 @@ class MiningTaxesController extends Controller foreach($extractions as $extraction) { foreach($structures as $structure) { //Create the dates in a carbon object, then only get the Y-m-d to compare. - $tempStructureDate = Carbon::createFromFormat('Y-m-d', $structure['date']); - $extractionDate = Carbon::createFromFormat('Y-m-d', $esiHelper->DecodeDate($extraction->chunk_arrival_time)); + $tempStructureDate = Carbon::createFromFormat('Y-m-d H:i:s', $structure['date'])->toDateString(); + $extractionDate = Carbon::createFromFormat('Y-m-d H:i:s', $esiHelper->DecodeDate($extraction->chunk_arrival_time))->toDateString(); //Check if the dates are equal then increase the total by 1 - if($tempStructureDate->equalTo($extractionDate)) { + if($tempStructureDate == $extractionDate) { $structure['total'] = $structure['total'] + 1; } }