summaryrefslogtreecommitdiff
path: root/httemplate/search/customer_accounting_summary.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-03 02:34:04 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-03 02:34:04 -0700
commitf619b706a2b375b5ef29fa3664eb3da90bb90ef5 (patch)
treebfb178796545bc956c45ccbe6d518a23b3fbac7e /httemplate/search/customer_accounting_summary.html
parentdae45b800de33e67dd8836b4dbb57df7595b03b5 (diff)
add advertising source to customer accounting summary, RT#18349
Diffstat (limited to 'httemplate/search/customer_accounting_summary.html')
-rw-r--r--httemplate/search/customer_accounting_summary.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/httemplate/search/customer_accounting_summary.html b/httemplate/search/customer_accounting_summary.html
index 8da8914c8..72a00ed95 100644
--- a/httemplate/search/customer_accounting_summary.html
+++ b/httemplate/search/customer_accounting_summary.html
@@ -30,6 +30,19 @@ elsif ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
die "agentnum $agentnum not found!" unless $sel_agent;
}
my $title = $sel_agent ? $sel_agent->agent.' ' : '';
+
+my ($refnum,$sel_part_referral);
+#if ( $cgi->param('refnum') eq 'all' ) {
+# $refnum = 0;
+#} els
+if ( $cgi->param('refnum') =~ /^(\d+)$/ ) {
+ $refnum = $1;
+ $sel_part_referral = qsearchs('part_referral', { 'refnum' => $refnum } );
+ die "refnum $refnum not found!" unless $sel_part_referral;
+}
+$title .= $sel_part_referral->referral.' '
+ if $sel_part_referral;
+
$title .= 'Customer Accounting Summary Report';
my @custs = ();
@@ -45,6 +58,7 @@ die "invalid status" unless $status =~ /^\w+|$/;
foreach my $cust_main ( @custs ) {
next unless ($status eq '' || $status eq $cust_main->status);
next unless ($agentnum == 0 || $cust_main->agentnum eq $agentnum);
+ next unless ($refnum == 0 || $cust_main->refnum eq $refnum);
push @items, 'netsales', 'cashflow';