[freeside-commits] freeside/FS/FS cust_pkg_discount.pm,1.10,1.11

Ivan,,, ivan at wavetail.420.am
Mon Nov 21 20:35:11 PST 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv11892

Modified Files:
	cust_pkg_discount.pm 
Log Message:
fix incorrect error message: Discount does not apply to setup fees, and package has no recurring, RT#15257

Index: cust_pkg_discount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg_discount.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -d -r1.10 -r1.11
--- cust_pkg_discount.pm	22 Nov 2011 04:31:58 -0000	1.10
+++ cust_pkg_discount.pm	22 Nov 2011 04:35:09 -0000	1.11
@@ -172,7 +172,7 @@
   return $error if $error;
 
   return "Discount does not apply to setup fees, and package has no recurring"
-    if ! $self->discount->setup && ! $self->cust_pkg->part_pkg->freq;
+    if ! $self->discount->setup && $self->cust_pkg->part_pkg->freq =~ /^0/;
 
   $self->usernum($FS::CurrentUser::CurrentUser->usernum) unless $self->usernum;
 



More information about the freeside-commits mailing list