From: Ivan Kohler Date: Sat, 17 Jan 2015 02:38:06 +0000 (-0800) Subject: Merge branch 'fix_category_table' of https://github.com/jgoodman/Freeside into jgoodm... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=e1cac73de0b294dd3baeb792509fbf089fe981d3;hp=2b22859ec037627196e3153719359efe46e42178 Merge branch 'fix_category_table' of https://github.com/jgoodman/Freeside into jgoodman-fix_category_table --- diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 6c75fe950..330a4547b 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -3,6 +3,7 @@ package FS::cust_main::Billing_Realtime; use strict; use vars qw( $conf $DEBUG $me ); use vars qw( $realtime_bop_decline_quiet ); #ugh +use Carp; use Data::Dumper; use Business::CreditCard 0.28; use FS::UID qw( dbh ); @@ -319,6 +320,10 @@ my %bop_method2payby = ( sub realtime_bop { my $self = shift; + confess "Can't call realtime_bop within another transaction ". + '($FS::UID::AutoCommit is false)' + unless $FS::UID::AutoCommit; + local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG; my %options = (); diff --git a/FS/FS/part_pkg/voip_cdr.pm b/FS/FS/part_pkg/voip_cdr.pm index e3fdd79ff..205335b7e 100644 --- a/FS/FS/part_pkg/voip_cdr.pm +++ b/FS/FS/part_pkg/voip_cdr.pm @@ -683,6 +683,7 @@ sub reset_usage { # tells whether cust_bill_pkg_detail should return a single line for # each phonenum +# i think this is currently unused? sub sum_usage { my $self = shift; $self->option('output_format') =~ /^sum_/; diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 62d7b877c..452f250d8 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -294,25 +294,21 @@ sub table_info { label => 'Quota', #Mail storage limit type => 'text', disable_inventory => 1, - disable_select => 1, }, 'file_quota'=> { label => 'File storage limit', type => 'text', disable_inventory => 1, - disable_select => 1, }, 'file_maxnum'=> { label => 'Number of files limit', type => 'text', disable_inventory => 1, - disable_select => 1, }, 'file_maxsize'=> { label => 'File size limit', type => 'text', disable_inventory => 1, - disable_select => 1, }, '_password' => 'Password', 'gid' => { diff --git a/httemplate/elements/mac_addr.html b/httemplate/elements/mac_addr.html new file mode 100644 index 000000000..1d867f504 --- /dev/null +++ b/httemplate/elements/mac_addr.html @@ -0,0 +1,53 @@ +% if (!$init) { +% if ($clipboard_hack) { +<& init_overlib.html &> + + +% } # if $clipboard_hack +% $init++; +% } +%# the only part to be included in every instance +<% $value |h %> +<%shared> +my $init = 0; + +<%init> +my $clipboard_hack = + $FS::CurrentUser::CurrentUser->option('enable_mask_clipboard_hack'); +my $value = shift; # no other params + diff --git a/httemplate/view/cust_main/packages/package.html b/httemplate/view/cust_main/packages/package.html index cf5c98a1c..e47d891f5 100644 --- a/httemplate/view/cust_main/packages/package.html +++ b/httemplate/view/cust_main/packages/package.html @@ -52,8 +52,15 @@ % # One-time charge. Nothing you can do with this, unless: % if ( $curuser->access_right('Modify one-time charge') ) { ( <%onetime_change_link($cust_pkg)%> ) -
% } +% # also, you can discount it +% if ( $curuser->access_right('Discount customer package') +% && ! scalar($cust_pkg->cust_pkg_discount_active) +% && ! scalar($cust_pkg->part_pkg->part_pkg_discount) +% ) { + ( <%pkg_discount_link($cust_pkg)%> ) +% } +
% % } elsif ( !$cust_pkg->get('cancel') and !$opt{no_links} ) { % diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index 6c5c90201..b7f7a2c63 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -222,6 +222,7 @@ my $format_field = sub { $field = $f; $type = 'text'; } + warn "$field\t$type\t$value\n"; my $columndef = $part_svc->part_svc_column($field); # skip fields that are fixed and empty @@ -273,8 +274,10 @@ my $format_field = sub { $value = time2str("$date_format %H:%M",$value) } elsif ( $type eq 'checkbox' ) { $value = $value eq 'Y' ? emt('Yes') : emt('No'); - } elsif ( $type eq 'mac_addr' and $value =~ /\w/) { - $value .= ' ('. (Net::MAC::Vendor::lookup($value))->[0]. ')' + } elsif ( $type =~ /(input-)?mac_addr/ and $value =~ /\w/) { + my $vendor = Net::MAC::Vendor::lookup($value)->[0]; + $value .= " ($vendor)" if $vendor; + $value = $m->scomp('/elements/mac_addr.html', $value); } # 'link' option