X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=101fe2cfffc6f2d9c94c9b458eea5e224608d77a;hp=dfa32d3a5cf5bef4176410e4d4cb54ba3cbec65b;hb=0c81ee14be99875c8f9f9e34a442a23543333611;hpb=2c9b97801b3981efaf6c65118e3cc1a0368e649c
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index dfa32d3a5..101fe2cff 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -1,653 +1,165 @@
-
-<%
-
-my $conf = new FS::Conf;
-
-#false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so
-my %uiview = ();
-my %uiadd = ();
-foreach my $part_svc ( qsearch('part_svc',{}) ) {
- $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi";
- $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi";
+%
+%
+%my $conf = new FS::Conf;
+%
+%my $curuser = $FS::CurrentUser::CurrentUser;
+%
+%die "No customer specified (bad URL)!" unless $cgi->keywords;
+%my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
+%$query =~ /^(\d+)$/;
+%my $custnum = $1;
+%my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
+%die "Customer not found!" unless $cust_main;
+%
+%
+
+
+<% include("/elements/header.html","Customer View: ". $cust_main->name ) %>
+% if ( $curuser->access_right('Edit customer') ) {
+
+ Edit this customer |
+% }
+
+
+
+
+
+
+
+
+
-print header("Customer View", menubar(
- 'Main Menu' => popurl(2)
-));
-
-die "No customer specified (bad URL)!" unless $cgi->keywords;
-my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
-$query =~ /^(\d+)$/;
-my $custnum = $1;
-my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
-die "Customer not found!" unless $cust_main;
-
-print qq!Edit this customer!;
-print qq! | Delete this customer!
- if $conf->exists('deletecustomers');
-
-unless ( $conf->exists('disable_customer_referrals') ) {
- print qq! | !,
- qq!Refer a new customer!;
-
- print qq! | !,
- qq!View this customer's referrals!;
-}
+
+% if ( $curuser->access_right('Cancel customer')
+% && $cust_main->ncancelled_pkgs
+% ) {
+%
-print '';
-
-print '
'.
- '
Date | -Description | -Charge | -Payment | -In-house Credit |
- Refund | -Balance | ++ <% include('cust_main/contacts.html', $cust_main ) %> + | +
+ <% include('cust_main/misc.html', $cust_main ) %>
+% if ( $conf->config('payby-default') ne 'HIDE' ) {
+
+ + <% include('cust_main/billing.html', $cust_main ) %> +% } + + |
---|---|---|---|---|---|---|---|---|
"; - print qq!! unless $target && $target{$target}++; - print time2str("%D",$date); - print '' if $target && $target{$target} == 1; - print " | ", - "$desc | ", - "", - ( $charge ? "\$".sprintf("%.2f",$charge) : '' ), - " | ", - "", - ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ), - " | ", - "", - ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ), - " | ", - "", - ( $refund ? "\$".sprintf("%.2f",$refund) : '' ), - " | ", - "\$" . $balance, - " | ", - "\n"; -} +
<% encode_entities($cust_main->comments) %>+