From 747949f05c140e23221b3a2364928431f58fc2d3 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sat, 16 May 2015 16:08:15 -0700 Subject: [PATCH] customer view UI --- httemplate/elements/freeside.css | 19 ++++++-- httemplate/elements/tr-coords.html | 6 +-- httemplate/view/cust_main/billing.html | 80 +++++++++++++++---------------- httemplate/view/cust_main/contacts.html | 56 +++++++++++----------- httemplate/view/cust_main/cust_payby.html | 48 +++++++++---------- httemplate/view/cust_main/misc.html | 52 ++++++++++---------- 6 files changed, 135 insertions(+), 126 deletions(-) diff --git a/httemplate/elements/freeside.css b/httemplate/elements/freeside.css index d038f6f3d..280427cac 100644 --- a/httemplate/elements/freeside.css +++ b/httemplate/elements/freeside.css @@ -225,18 +225,30 @@ div.fstabcontainer { } .fsinnerbox { - background-color:#cccccc; + /* background-color:#cccccc; */ padding:2px; - -moz-box-shadow: 1px 1px 2px #666666; + border: 1px solid #dddddd; + /* -moz-box-shadow: 1px 1px 2px #666666; -webkit-box-shadow: 1px 1px 2px #666666; box-shadow: 1px 1px 2px #666666; filter: progid:DXImageTransform.Microsoft.Shadow(color='#666666', Direction=135, Strength=2); + */ +} + +.fsinnerbox th { + font-weight:normal; + font-size:75%; + valign: bottom; + color: #999999; } .fsinnerbox-title { font-size:110%; font-weight:bold; - background-color:#cccccc; + /*border-top: 1px solid #dddddd; + border-left: 1px solid #dddddd; + border-right: 1px solid #dddddd; */ + /* background-color:#cccccc; padding:2px; -moz-border-radius-topleft:8px; -moz-border-radius-topright:8px; @@ -248,6 +260,7 @@ div.fstabcontainer { -webkit-box-shadow: 1px 0px 1px #999999; box-shadow: 1px 0px 1px #999999; filter: progid:DXImageTransform.Microsoft.Shadow(color='#999999', Direction=90, Strength=1); + */ } .background { diff --git a/httemplate/elements/tr-coords.html b/httemplate/elements/tr-coords.html index 5ac5ed4e4..ef5e76bab 100644 --- a/httemplate/elements/tr-coords.html +++ b/httemplate/elements/tr-coords.html @@ -1,9 +1,7 @@ - <% mt('Latitude') |h %> + <% mt('Coordinates') |h %> - <% $latitude %> -  <% mt('Longitude') |h %> - <% $longitude %> + <% $latitude %>, <% $longitude %> <& /elements/coord-links.html, @_ &> diff --git a/httemplate/view/cust_main/billing.html b/httemplate/view/cust_main/billing.html index 4f4b74587..84241d297 100644 --- a/httemplate/view/cust_main/billing.html +++ b/httemplate/view/cust_main/billing.html @@ -20,8 +20,8 @@ % if ( $cust_main->complimentary ) { - <% mt('Complimentary') |h %> - <% $yes %> + <% mt('Complimentary') |h %> + <% $yes %> % } @@ -29,14 +29,14 @@ % =~ s/^(\-?)(.*)$/$1<\/FONT>$money_char$2/; - <% mt('Balance due') |h %> - <% $balance %> + <% mt('Balance due') |h %> + <% $balance %> % if ( $conf->exists('cust_main-select-prorate_day') ) { - <% mt('Prorate day of month') |h %> - <% $cust_main->prorate_day %> + <% mt('Prorate day of month') |h %> + <% $cust_main->prorate_day %> % } @@ -50,16 +50,16 @@ % ) % { - <% mt('Payment day of month') |h %> - <% $cust_main->billday %> + <% mt('Payment day of month') |h %> + <% $cust_main->billday %> % } % if ( $cust_main->po_number ) { - <% mt('Purchase Order #') |h %> - <% $cust_main->po_number %> + <% mt('Purchase Order #') |h %> + <% $cust_main->po_number %> % } @@ -70,16 +70,16 @@ % ) % { - <% mt('Tax exempt') |h %><% @exempt_groups ? ' ('.emt('all taxes').')' : '' %> - <% $cust_main->tax ? $yes : $no %> + <% mt('Tax exempt') |h %><% @exempt_groups ? ' ('.emt('all taxes').')' : '' %> + <% $cust_main->tax ? $yes : $no %> % } % foreach my $exempt_group ( @exempt_groups ) { % my $cust_main_exemption = $cust_main->tax_exemption($exempt_group); - <% mt('Tax exempt') |h %> (<% $exempt_group %> taxes) - <% $cust_main_exemption ? $yes : $no %> + <% mt('Tax exempt') |h %> (<% $exempt_group %> taxes) + <% $cust_main_exemption ? $yes : $no %> <% $cust_main_exemption ? $cust_main_exemption->exempt_number : '' |h %> @@ -87,16 +87,16 @@ % if ( $conf->exists('enable_taxproducts') ) { - <% mt('Tax location') |h %> + <% mt('Tax location') |h %> % my $tax_location = $conf->exists('tax-ship_address') % ? $cust_main->ship_location % : $cust_main->bill_location; - <% $tax_location->geocode('cch') %> + <% $tax_location->geocode('cch') %> % } - <% mt('Postal mail invoices') |h %> - + <% mt('Postal mail invoices') |h %> + <% ( grep { $_ eq 'POST' } @invoicing_list ) ? $yes. ( $cust_main->invoice_attn ? ', attn: '. $cust_main->invoice_attn @@ -107,15 +107,15 @@ - <% mt('Email invoices') |h %> - + <% mt('Email invoices') |h %> + <% $cust_main->invoice_noemail ? $no : $yes %> % unless ( $conf->exists('cust-email-high-visibility')) { - <% mt('Email address(es)') |h %> - + <% mt('Email address(es)') |h %> + <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || $no %> % if ( $cust_main->message_noemail ) {
@@ -125,8 +125,8 @@ % } - <% mt('Invoice terms') |h %> - + <% mt('Invoice terms') |h %> + <% $cust_main->invoice_terms || emt('Default').' ('. ( $conf->config('invoice_default_terms', $cust_main->agentnum) || emt('Payable upon receipt') @@ -136,8 +136,8 @@ - <% mt('Credit limit') |h %> - + <% mt('Credit limit') |h %> + % my $default_credit_limit = $conf->config('default_credit_limit'); <% length($cust_main->credit_limit) ? $money_char. sprintf("%.2f", $cust_main->credit_limit) @@ -153,51 +153,51 @@ % if ( $conf->exists('voip-cust_cdr_spools') ) { - <% mt('Spool CDRs') |h %> - <% $cust_main->spool_cdr ? $yes : $no %> + <% mt('Spool CDRs') |h %> + <% $cust_main->spool_cdr ? $yes : $no %> % } % if ( $conf->exists('voip-cust_cdr_squelch') ) { - <% mt($conf->exists('voip-cdr_email') ? 'Print CDRs' : 'Show CDRs') |h %> - <% $cust_main->squelch_cdr ? $no : $yes %> + <% mt($conf->exists('voip-cdr_email') ? 'Print CDRs' : 'Show CDRs') |h %> + <% $cust_main->squelch_cdr ? $no : $yes %> % } % if ( $conf->exists('voip-cust_accountcode_cdr') ) { - <% mt('Breakdown CDRs by accountcode') |h %> - <% $cust_main->accountcode_cdr ? $yes : $no %> + <% mt('Breakdown CDRs by accountcode') |h %> + <% $cust_main->accountcode_cdr ? $yes : $no %> % } % if ( $conf->exists('voip-cust_email_csv_cdr') ) { - <% mt('Email CDRs as CSV') |h %> - <% $cust_main->email_csv_cdr ? $yes : $no %> + <% mt('Email CDRs as CSV') |h %> + <% $cust_main->email_csv_cdr ? $yes : $no %> % } % if ( $show_term || $cust_main->cdr_termination_percentage ) { - <% mt('CDR termination settlement') |h %> - <% $cust_main->cdr_termination_percentage %><% $cust_main->cdr_termination_percentage =~ /\d/ ? '%' : '' %> + <% mt('CDR termination settlement') |h %> + <% $cust_main->cdr_termination_percentage %><% $cust_main->cdr_termination_percentage =~ /\d/ ? '%' : '' %> % } % if ( $cust_main->currency ) { - <% mt('Invoicing currency') |h %> - <% $cust_main->currency. ': '. code2currency($cust_main->currency) %> + <% mt('Invoicing currency') |h %> + <% $cust_main->currency. ': '. code2currency($cust_main->currency) %> % } % if ( $cust_main->locale ) { % my %locale_info = FS::Locales->locale_info($cust_main->locale); - <% mt('Invoicing locale') |h %> - <% $locale_info{name} . " (" . $locale_info{country} .")" %> + <% mt('Invoicing locale') |h %> + <% $locale_info{name} . " (" . $locale_info{country} .")" %> % } diff --git a/httemplate/view/cust_main/contacts.html b/httemplate/view/cust_main/contacts.html index a5bafea10..83a638026 100644 --- a/httemplate/view/cust_main/contacts.html +++ b/httemplate/view/cust_main/contacts.html @@ -25,11 +25,11 @@ % if ( $this eq 'bill' ) { % #billing contact fields - <% mt('Contact name') |h %> - <% $cust_main->contact |h %> + <% mt('Contact name') |h %> + <% $cust_main->contact |h %> % if ( $conf->exists('show_ss') ) { - <% mt('SS#') |h %> - <% $conf->exists('unmask_ss') + <% mt('SS#') |h %> + <% $conf->exists('unmask_ss') ? $cust_main->ss : $cust_main->masked('ss') || ' ' %> % } @@ -37,8 +37,8 @@ % if ( $conf->exists('cust_main-enable_spouse') and % ($cust_main->spouse_last or $cust_main->spouse_first) ) { - <% mt('Spouse') |h %> - + <% mt('Spouse') |h %> + <% join(', ', grep $_, $cust_main->spouse_last, $cust_main->spouse_first) %> @@ -46,7 +46,7 @@ % } % if ( $conf->exists('cust-email-high-visibility') ) { - <% mt('Email address(es)') |h %> + <% mt('Email address(es)') |h %> <% $cust_main->invoicing_list_emailonly_scalar || $no %> @@ -54,15 +54,15 @@ % } % if ( $cust_main->company ) { - <% mt('Company') |h %> - <% $cust_main->company |h %> + <% mt('Company') |h %> + <% $cust_main->company |h %> % } % } elsif ( $this eq 'ship' ) { % if ( $cust_main->ship_company ) { # mostly obsolete these days... <% mt('Company') |h %> - <% $cust_main->ship_company |h %> + <% $cust_main->ship_company |h %> % } % } @@ -73,13 +73,13 @@ % if ( $location->locationname ) { <% mt('Location ID') |h %> - <% $location->locationname |h %> + <% $location->locationname |h %> % } - <% mt('Address') |h %> - <% $location->address1 |h %> + <% mt('Address') |h %> + <% $location->address1 |h %> % if ( $location->get('address2') ) { @@ -88,27 +88,25 @@ % : ' '; - <% $address2_label %> - <% $location->address2 |h %> + <% $address2_label %> + <% $location->address2 |h %> % } - <% mt('City') |h %> - <% $location->city |h %> + + <% $location->city |h %>\ % if ( $location->county ) { - <% mt('County') |h %> - <% $location->county |h %> + (<% $location->county |h %> county)\ % } - <% mt('State') |h %> - <% state_label( $location->state, $location->country ) |h %> - <% mt('Zip') |h %> - <% $location->zip %> +,<% state_label( $location->state, $location->country ) |h %> + <% $location->zip %> + - <% mt('Country') |h %> - <% code2country( $location->country ) %> + + <% code2country( $location->country ) %> % if ( $location->latitude && $location->longitude ) { @@ -128,7 +126,7 @@ % next if !$cust_main->get($phone); <% $phone_label{$phone} %> - + <& /elements/phonenumber.html, $cust_main->get($phone), callable => 1, @@ -142,7 +140,7 @@ <% mt('Fax') |h %> - + <% $cust_main->get('fax') || ' ' %> @@ -153,9 +151,9 @@ <% $stateid_label %> - <% $cust_main->masked('stateid') || ' ' %> + <% $cust_main->masked('stateid') || ' ' %> <% $stateid_state_label %> - <% $cust_main->stateid_state || ' ' %> + <% $cust_main->stateid_state || ' ' %> % } diff --git a/httemplate/view/cust_main/cust_payby.html b/httemplate/view/cust_main/cust_payby.html index 90ce96e8a..a91c42502 100644 --- a/httemplate/view/cust_main/cust_payby.html +++ b/httemplate/view/cust_main/cust_payby.html @@ -13,36 +13,36 @@ % my $auto = $cust_payby->payby eq 'CARD' ? 'automatic' : 'on-demand'; - + <% mt("Credit card ([_1])",$auto) |h %> - <% mt('Card number') |h %> - <% $cust_payby->paymask %> + <% mt('Card number') |h %> + <% $cust_payby->paymask %> % my( $mon, $year ) = $cust_payby->paydate_mon_year; - <% mt('Expiration') |h %> - <% "$mon/$year" %> + <% mt('Expiration') |h %> + <% "$mon/$year" %> % if ( $cust_payby->paystart_month ) { - <% mt('Start date') |h %> - <% $cust_payby->paystart_month. '/'. $cust_payby->paystart_year %> + <% mt('Start date') |h %> + <% $cust_payby->paystart_month. '/'. $cust_payby->paystart_year %> % } elsif ( $cust_payby->payissue ) { - <% mt('Issue #') |h %> - <% $cust_payby->payissue %> + <% mt('Issue #') |h %> + <% $cust_payby->payissue %> % } - <% mt('Name on card') |h %> - <% $cust_payby->payname %> + <% mt('Name on card') |h %> + <% $cust_payby->payname %> % } elsif ( $cust_payby->payby eq 'CHEK' || $cust_payby->payby eq 'DCHK') { @@ -55,7 +55,7 @@ % if $conf->config('echeck-country') eq 'CA'; - + <% mt("Electronic check ([_1])",$auto) |h %> @@ -65,34 +65,34 @@ % ? 'ABA/Routing number' % : 'Routing number'; - <% mt($routing_label) |h %> - <% $aba %> + <% mt($routing_label) |h %> + <% $aba %> % if ( $conf->config('echeck-country') eq 'CA' ) { - <% mt('Branch number') |h %> - <% $branch %> + <% mt('Branch number') |h %> + <% $branch %> % } - <% mt('Account number') |h %> - <% $account %> + <% mt('Account number') |h %> + <% $account %> - <% mt('Account type') |h %> - <% $cust_payby->paytype %> + <% mt('Account type') |h %> + <% $cust_payby->paytype %> - <% mt('Bank name') |h %> - <% $cust_payby->payname %> + <% mt('Bank name') |h %> + <% $cust_payby->payname %> % if ( $conf->exists('show_bankstate') ) { - <% $paystate_label %> - <% $cust_payby->paystate || '   ' %> + <% $paystate_label %> + <% $cust_payby->paystate || '   ' %> % } diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html index f0ecf8f70..7e625d26c 100644 --- a/httemplate/view/cust_main/misc.html +++ b/httemplate/view/cust_main/misc.html @@ -29,15 +29,15 @@ % #if ( $cust_main->classnum ) { - <% mt('Class') |h %> - <% $cust_main->classname || '('.emt('none').')' %> + <% mt('Class') |h %> + <% $cust_main->classname || '('.emt('none').')' %> % #} % if ( $cust_main->salesnum ) { - <% mt('Sales Person') |h %> - <% $cust_main->salesperson |h %> + <% mt('Sales Person') |h %> + <% $cust_main->salesperson |h %> % } @@ -47,15 +47,15 @@ % } ); - <% mt('Advertising source') |h %> - <% $referral->refnum %>: <% $referral->referral%> + <% mt('Advertising source') |h %> + <% $referral->refnum %>: <% $referral->referral%> % } - <% mt('Referring Customer') |h %> - + <% mt('Referring Customer') |h %> + % % my $referring_cust_main = ''; % if ( $cust_main->referral_custnum @@ -82,13 +82,13 @@ - <% mt('Order taker') |h %> - <% $cust_main->otaker %> + <% mt('Order taker') |h %> + <% $cust_main->otaker %> - <% mt('Signup Date') |h %> - <% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %> + <% mt('Signup Date') |h %> + <% $cust_main->signupdate ? time2str($date_format, $cust_main->signupdate) : '' %> % my $id_country = $conf->config('national_id-country'); @@ -97,14 +97,14 @@ % my($old, $nric) = ( '', ''); % if ( $cust_main->national_id =~ /^\d{6}\-\d{2}\-\d{4}$/ ) { - <% mt('NRIC') |h %> + <% mt('NRIC') |h %> % } else { # elsif ( $cust_main->national_id =~ /^\w\d{9}$/ ) { - <% mt('Old IC/Passport') |h %> + <% mt('Old IC/Passport') |h %> % #} else { % # warn "unknown national_id format"; -%# +%# % } - <% $cust_main->national_id |h %> + <% $cust_main->national_id |h %> % } else { % warn "unknown national_id-country $id_country"; @@ -119,8 +119,8 @@ % : ''; - <% mt('Date of Birth') |h %> - <% $dt ? $dt->strftime($date_format) : '' %> + <% mt('Date of Birth') |h %> + <% $dt ? $dt->strftime($date_format) : '' %> % if ( $conf->exists('cust_main-enable_spouse') @@ -131,8 +131,8 @@ % ); - <% mt('Spouse Date of Birth') |h %> - <% $dt ? $dt->strftime($date_format) : '' %> + <% mt('Spouse Date of Birth') |h %> + <% $dt ? $dt->strftime($date_format) : '' %> % } @@ -146,8 +146,8 @@ % : ''; - <% mt('Anniversary Date') |h %> - <% $dt ? $dt->strftime($date_format) : '' %> + <% mt('Anniversary Date') |h %> + <% $dt ? $dt->strftime($date_format) : '' %> % } @@ -155,8 +155,8 @@ % if ( $cust_main->district ) { - <% mt('Tax district') |h %> - <% $cust_main->ship_location->district %> + <% mt('Tax district') |h %> + <% $cust_main->ship_location->district %> % } @@ -165,8 +165,8 @@ % if ( $conf->exists('ticket_system-selfservice_edit_subject') ) { - <% mt('Edit ticket subjects') %> - <% $cust_main->edit_subject ? 'yes' : 'no' %> + <% mt('Edit ticket subjects') %> + <% $cust_main->edit_subject ? 'yes' : 'no' %> % } -- 2.11.0