type => 'text',
disable_inventory => 1,
disable_select => 1,
- disable_part_svc_column => 1,
+ #disable_part_svc_column => 1,
},
'upbytes' => { label => 'Upload',
type => 'text',
return '' unless $amount;
+ return ''
+ if $self->cust_svc->part_svc->part_svc_column($column)->columnflag eq 'F';
+
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $SIG{QUIT} = 'IGNORE';
die "Can't update $column for svcnum". $self->svcnum
if $rv == 0;
- #$self->snapshot; #not necessary, we retain the old values
- #create an object with the updated usage values
- my $new = qsearchs('svc_acct', { 'svcnum' => $self->svcnum });
- #call exports
- my $error = $new->replace($self);
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return "Error replacing: $error";
+ if ( $conf->exists('radius-chillispot-max') ) {
+ #$self->snapshot; #not necessary, we retain the old values
+ #create an object with the updated usage values
+ my $new = qsearchs('svc_acct', { 'svcnum' => $self->svcnum });
+ #call exports
+ my $error = $new->replace($self);
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "Error replacing: $error";
+ }
}
#overlimit_action eq 'cancel' handling
die "Can't update usage for svcnum ". $self->svcnum
if $rv == 0;
}
-
- #$self->snapshot; #not necessary, we retain the old values
- #create an object with the updated usage values
- my $new = qsearchs('svc_acct', { 'svcnum' => $self->svcnum });
- local($FS::Record::nowarn_identical) = 1;
- my $error = $new->replace($self); #call exports
- if ( $error ) {
- $dbh->rollback if $oldAutoCommit;
- return "Error replacing: $error";
+
+ if ( $conf->exists('radius-chillispot-max') ) {
+ #$self->snapshot; #not necessary, we retain the old values
+ #create an object with the updated usage values
+ my $new = qsearchs('svc_acct', { 'svcnum' => $self->svcnum });
+ local($FS::Record::nowarn_identical) = 1;
+ my $error = $new->replace($self); #call exports
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return "Error replacing: $error";
+ }
}
if ( $reset ) {