5 <& /elements/header-cust_main.html,
6 view => 'basics', #required
7 cust_main => $cust_main, # cust_main or custnum is required
12 <& /elements/header.html, {
14 'title_noescape' => $title_noescape,
17 'include_selectize' => $opt{include_selectize} ? 1 : 0,
22 % my @part_tag = $cust_main->part_tag;
23 % if ( $conf->config('cust_tag-location') eq 'top' && @part_tag ) {
24 <TABLE STYLE="margin-bottom:8px" CELLSPACING=2>
25 % foreach my $part_tag ( @part_tag ) {
29 <% length($part_tag->tagcolor)
30 ? 'STYLE="background-color:#'.$part_tag->tagcolor.'"'
32 %>><% $part_tag->tagname.': '. $part_tag->tagdesc |h %></FONT>
38 % if ( scalar @cust_locations_missing_district ) {
39 <div style="margin: 0 1em; padding: 1em; border: solid 1px #999; background-color: #fee;">
40 <h4 style="margin: 0; border-bottom: solid 1px #aaa; color: red;">Customer will not be billed:</h4>
41 <p style="margin: .5em;">
42 The following customer locations are missing tax districts for Washington State.<br>
43 Sales taxes cannot be calculated for this customer.<br>
44 Correct the address information, or enter a tax district number.
46 % for my $cust_location ( @cust_locations_missing_district ) {
48 (<a href="#" onclick="overlib_edit_location(<% $cust_location->locationnum %>);">
51 <% $cust_location->address1 %>
52 <% $cust_location->city %>
53 <% $cust_location->state %>
54 <% $cust_location->zip %>
55 (<% $cust_location->locationnum %>)
57 % } # /for my $cust_location
61 function overlib_edit_location(locationnum) {
64 '<% $fsurl %>edit/cust_location.cgi?locationnum=' + locationnum,
66 'popup-1548013977-3901-3256727185.50958',
70 CAPTION, 'Edit location',
88 % } # /if @cust_locations_missing_district
89 <& /view/cust_main/menu.html, cust_main => $cust_main, show => $opt{'view'} &>
92 <DIV CLASS="fstabcontainer">
94 <& /elements/init_overlib.html &>
96 <SCRIPT TYPE="text/javascript">
97 function areyousure(href, message) {
98 if (confirm(message) == true)
99 window.location.href = href;
101 function areyousure_popup(message, action, actionlabel) {
102 if (confirm(message) == true) {
103 <% include('/elements/popup_link_onclick.html',
104 'js_action' => 'action',
105 'js_actionlabel' => 'actionlabel',
113 my $curuser = $FS::CurrentUser::CurrentUser;
115 my $conf = new FS::Conf;
119 my $cust_main = $opt{'cust_main'} || qsearchs( {
120 'table' => 'cust_main',
121 'hashref' => { 'custnum' => $opt{'custnum'} },
122 'extra_sql' => ' AND '. $curuser->agentnums_sql,
124 die "Customer not found!" unless $cust_main;
126 my $title = mt("Customer").' #'. $cust_main->display_custnum. ': ';
127 my $title_noescape = $title. encode_entities($cust_main->name);
128 $title .= $cust_main->name;
130 if ( $curuser->num_agents ) {
132 encode_entities($cust_main->agent->agent). " $title_noescape";
133 $title = $cust_main->agent->agent. " $title";
136 my $status = $cust_main->status_label;
137 $status .= ' (Cancelled)' if $cust_main->is_status_delay_cancel;
138 $title_noescape .= ' (<B><FONT COLOR="#'. $cust_main->statuscolor. '">'. $status. '</FONT></B>)';
139 $title .= " ($status)";
141 my $ie_compat = $conf->config('ie-compatibility_mode');
144 $head = qq(<meta http-equiv="X-UA-Compatible" content="IE=$ie_compat" />);
147 my @cust_locations_missing_district;
148 my $tax_district_method = $conf->config('tax_district_method');
149 if ( $tax_district_method && $tax_district_method eq 'wa_sales' ) {
150 @cust_locations_missing_district = $cust_main->cust_locations_missing_district();