[freeside-commits] branch master updated. 034089cb2e60fc44ca895984a3a20c66ff50ce77

Ivan ivan at 420.am
Mon Aug 26 12:45:14 PDT 2013


The branch, master has been updated
       via  034089cb2e60fc44ca895984a3a20c66ff50ce77 (commit)
      from  eedfe58ba50912dbfb490aa47930bbc0ab9e3ac9 (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 034089cb2e60fc44ca895984a3a20c66ff50ce77
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Aug 26 12:45:13 2013 -0700

    continue sales person work: customer and package selection, commissions, reporting.  RT#23402

diff --git a/FS/FS/part_event/Action/pkg_sales_credit.pm b/FS/FS/part_event/Action/pkg_sales_credit.pm
index caa25cc..cca123a 100644
--- a/FS/FS/part_event/Action/pkg_sales_credit.pm
+++ b/FS/FS/part_event/Action/pkg_sales_credit.pm
@@ -12,7 +12,12 @@ sub do_action {
   my $cust_main = $self->cust_main($cust_pkg);
 
   my $sales = $cust_pkg->sales;
-  return "No customer record for sales person ". $sales->salesperson
+  $sales ||= $self->cust_main($cust_pkg)->sales
+    if $self->option('cust_main_sales');
+
+  return '' unless $sales; #no sales person, no credit
+
+  die "No customer record for sales person ". $sales->salesperson
     unless $sales->sales_custnum;
 
   my $sales_cust_main = $sales->sales_cust_main;

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

Summary of changes:
 FS/FS/part_event/Action/pkg_sales_credit.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list