[freeside-commits] branch FREESIDE_3_BRANCH updated. 2e3fbe5f06250cd034308ec12c77fc68b0a79f96

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


The branch, FREESIDE_3_BRANCH has been updated
       via  2e3fbe5f06250cd034308ec12c77fc68b0a79f96 (commit)
      from  41592b95d0f43281a84db45e2aea24c708a96f76 (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 2e3fbe5f06250cd034308ec12c77fc68b0a79f96
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Aug 26 12:45:14 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