Comission Problem Fixed

Troy Hammonds troyh at netsignia.net
Tue Apr 12 11:47:44 PDT 2005


In flat_comission_cust.pm calc_recur uses function
referral_cust_pkgcust_main_ncancelled which I cant seem to find. After
some looking around I found referral_cust_main_ncancelled which does
what it suppose to do. I changed the following line in
flat_comission_cust.pm and the commission works line it suppose to now.

FROM:
$cust_pkg->cust_main->referral_cust_pkgcust_main_ncancelled($self->option('comission_depth')

TO:

$cust_pkg->cust_main->referral_cust_main_ncancelled($self->option('comission_depth')

-Troy


--------quote ---------

I am running freeside 1.5.0pre6.  I offer a $1.00 reacuring comission to
all customers for each referal they bring to my company as log and the
customer has an active backage. Now this works well if the person has a
refer but if they have no refer or there refers packs is suspended or
cancled there account will not bill. When the package tryes to bill I
get the following error.

Your request could not be processed because of the following error: 

error inserting FS::cust_credit=HASH(0x955b3bc): amount must be > 0
at /usr/local/lib/perl5/site_perl/5.8.5/FS/part_pkg/flat_comission.pm
line 46. Stack:
[/usr/local/lib/perl5/site_perl/5.8.5/FS/part_pkg/flat_comission.pm:46]
[/usr/local/lib/perl5/site_perl/5.8.5/FS/cust_pkg.pm:526]
[/usr/local/lib/perl5/site_perl/5.8.5/FS/cust_main.pm:1201]
[/usr/local/apache/htdocs/misc/bill.cgi:10]
[/usr/local/apache/htdocs/autohandler:1] 


Is there a way I can fix this so that it still bills them? I just
noticed this and some of my custoemrs have not been billed in a few
months becouse of the errors.


-------- end quote ------------




More information about the freeside-users mailing list