X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2Ft%2Fsuite%2F05-prorate_sync_same_day.t;h=ec78f5447c30893a9f1ed9d31f0f5c637a594d1c;hp=315be0606d5f32bdaec74a20243a2a30e7a114bf;hb=3f371be77db54c521eb2bd7aba64b381d2e38049;hpb=4321924ff5a68868a7ee622920fd4bbd53d6475f diff --git a/FS/t/suite/05-prorate_sync_same_day.t b/FS/t/suite/05-prorate_sync_same_day.t index 315be0606..ec78f5447 100755 --- a/FS/t/suite/05-prorate_sync_same_day.t +++ b/FS/t/suite/05-prorate_sync_same_day.t @@ -5,10 +5,15 @@ Tests the effect of ordering and activating two sync_bill_date packages on the same day. Ref RT#42108. -Correct: If the packages have prorate_round_day = 1 (round nearest), or 3 -(round down) then the second package should be prorated one day short. If -they have prorate_round_day = 2 (round up), they should be billed -for the same amount. In both cases they should have the same next bill date. +Formerly correct: If the packages have prorate_round_day = 1 (round +nearest), or 3 (round down) then the second package should be prorated one +day short. If they have prorate_round_day = 2 (round up), they should be +billed for the same amount. In both cases they should have the same next +bill date. + +Revised RT#72928: The second package should be prorated one day short only +if the rounding mode is 1 (round nearest), as the nearest day is different +for the two packages. =cut @@ -82,7 +87,7 @@ foreach my $prorate_mode (1, 2, 3) { $error = $cust->bill_and_collect; # Check the amount billed. - if ( $prorate_mode == 1 or $prorate_mode == 3 ) { + if ( $prorate_mode == 1 ) { # it should be one day short, in March $recur = sprintf('%.2f', $recur * 30/31); }