Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Linksehat Staging Server
2024-03-05 13:41:28 +07:00
41 changed files with 3431 additions and 2144 deletions

View File

@@ -11,6 +11,7 @@ use Illuminate\Support\Facades\DB;
use App\Models\Member;
use App\Models\User;
use App\Models\Service;
use DateTime;
class Helper
{
@@ -426,4 +427,20 @@ class Helper
ini_set('memory_limit', '256M');
}
public static function dateParser($date_from_row) {
if ($date_from_row instanceof DateTime) {
return $date_from_row->format('Y-m-d');
} else if ($date_from_row != null) {
if (strtotime($date_from_row)){
return date('Y-m-d', strtotime($date_from_row));
} else {
// throw new ImportRowException(__('Format Date Invalid'), 0, null, $date_from_row);
return null;
}
} else {
// throw new ImportRowException(__('Format Date Invalid'), 0, null, $date_from_row);
return null;
}
}
}