changed empty string values to nulls if entry date from and to variables are empty

This commit is contained in:
2026-09-22 18:42:50 -04:00
parent 6401534c90
commit 067e0464d4
2 changed files with 7 additions and 11 deletions
+3 -6
View File
@@ -319,10 +319,7 @@ class PermitFacts extends Base {
if ($permitfact_entry_date_from !== null && $permitfact_entry_date_to !== null) {
if ($permitfact_entry_date_from > $permitfact_entry_date_to) {
[$permitfact_entry_date_from, $permitfact_entry_date_to] = [
$permitfact_entry_date_to,
$permitfact_entry_date_from
];
[$permitfact_entry_date_from, $permitfact_entry_date_to] = [$permitfact_entry_date_to, $permitfact_entry_date_from];
}
$where[] = "view_permitfacts.permitfact_entry_date BETWEEN :entry_date_from AND :entry_date_to";
@@ -435,9 +432,9 @@ class PermitFacts extends Base {
$permitfacts->record->permitfact_entry_date_to = !empty($permitfact_entry_date_to) ? date("m/d/Y", strtotime($permitfact_entry_date_to)) : date("m/d/Y", strtotime($user_subscription_end_date));
$permitfacts->record->permitfact_permit_date_from = !empty($permitfact_permit_date_from) ? date("m/d/Y", strtotime($permitfact_permit_date_from)) : "";
$permitfacts->record->permitfact_permit_date_from = !empty($permitfact_permit_date_from) ? date("m/d/Y", strtotime($permitfact_permit_date_from)) : null;
$permitfacts->record->permitfact_permit_date_to = !empty($permitfact_permit_date_to) ? date("m/d/Y", strtotime($permitfact_permit_date_to)) : "";
$permitfacts->record->permitfact_permit_date_to = !empty($permitfact_permit_date_to) ? date("m/d/Y", strtotime($permitfact_permit_date_to)) : null;
$permitfacts->addAttribute("count", $count);
$permitfacts->addAttribute("start", $start);
+2 -3
View File
@@ -29,13 +29,12 @@
<!-- Discord Webhook -->
<DiscordWebHookURL>
https://discordapp.com/api/webhooks/1396804024942198794/zdT2wisqhAZuZ_UPKmAmtV0z_rX-PZnyHIXsjpPHQO3uakBO2xQ3R44kOxb9QZ4QxebL</DiscordWebHookURL>
<DiscordWebHookURL>https://discordapp.com/api/webhooks/1396804024942198794/zdT2wisqhAZuZ_UPKmAmtV0z_rX-PZnyHIXsjpPHQO3uakBO2xQ3R44kOxb9QZ4QxebL</DiscordWebHookURL>
<SupportEmail>james.richie@onesourceits.com</SupportEmail>
<AdminEmail>allenf@bidalert.com</AdminEmail>
<AdminName>Allan Feifer</AdminName>
<FromEmail>info@dec-international.com</FromEmail>
<FromEmail>support@dec-international.com</FromEmail>
<FromName>Customer Service</FromName>
<SystemAdministrators>