From: Ivan Kohler Date: Tue, 7 Aug 2012 22:43:07 +0000 (-0700) Subject: cust_svc::ignore_quantity hack applies to services not in package too X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=cd6bb5eafb6c7df7ea3eb7b78226a0d9c4b572ed cust_svc::ignore_quantity hack applies to services not in package too --- diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index 2ec8f12c2..acd2fcdb7 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -335,10 +335,10 @@ sub check { ($part_svc) = grep { $_->svcpart == $self->svcpart } $cust_pkg->part_svc; return "No svcpart ". $self->svcpart. " services in pkgpart ". $cust_pkg->pkgpart - unless $part_svc; + unless $part_svc || $ignore_quantity; return "Already ". $part_svc->get('num_cust_svc'). " ". $part_svc->svc. " services for pkgnum ". $self->pkgnum - if $part_svc->get('num_avail') == 0 and !$ignore_quantity; + if $part_svc->get('num_avail') <= 0 and !$ignore_quantity; } $self->SUPER::check;