[freeside-commits] branch FREESIDE_4_BRANCH updated. 04656428015eb43d8441ec35cb0646b05d5743f4

Mitch Jackson mitch at freeside.biz
Wed Nov 28 16:38:48 PST 2018


The branch, FREESIDE_4_BRANCH has been updated
       via  04656428015eb43d8441ec35cb0646b05d5743f4 (commit)
      from  f49e004a02ae65209524071af08076508fc47692 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 04656428015eb43d8441ec35cb0646b05d5743f4
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Wed Nov 28 19:31:41 2018 -0500

    RT# 32238 Billing Event cust_birthdate - Cleaner date compare window

diff --git a/FS/FS/part_event/Condition/cust_birthdate.pm b/FS/FS/part_event/Condition/cust_birthdate.pm
index 56ce857cf..e8ecb061a 100644
--- a/FS/FS/part_event/Condition/cust_birthdate.pm
+++ b/FS/FS/part_event/Condition/cust_birthdate.pm
@@ -43,8 +43,10 @@ sub condition {
     die "Unparsable timeframe given: ".$self->option('timeframe');
   }
 
-  my $ck_dt = DateTime->from_epoch( epoch => $opt{time} );
-  my $bd_dt = DateTime->from_epoch( epoch => $birthdate );
+  my $ck_dt = DateTime->from_epoch( epoch => $opt{time} )
+                      ->truncate( to => 'day' );
+  my $bd_dt = DateTime->from_epoch( epoch => $birthdate )
+                      ->truncate( to => 'day' );
 
   # Find the birthday for this calendar year.  If customer birthday
   # has already passed this year, find the birthday for next year.

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_event/Condition/cust_birthdate.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list