[freeside-commits] freeside/httemplate/edit/process cdr_type.cgi, NONE, 1.1
Mark Wells
mark at wavetail.420.am
Fri Feb 11 15:59:30 PST 2011
- Previous message: [freeside-commits] freeside/httemplate/edit cdr_type.cgi, NONE, 1.1 rate.cgi, 1.17, 1.18 rate_detail.html, 1.6, 1.7 rate_region.cgi, 1.14, 1.15
- Next message: [freeside-commits] freeside/httemplate/elements select-cdr_type.html, NONE, 1.1 auto-table.html, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv19280/httemplate/edit/process
Added Files:
cdr_type.cgi
Log Message:
rate selection by CDR type, RT#10991
--- NEW FILE: cdr_type.cgi ---
% if ( $error ) {
% $cgi->param('error', $error);
<% $cgi->redirect(popurl(2). "cdr_type.cgi?". $cgi->query_string ) %>
% } else {
<% $cgi->redirect(popurl(2). "cdr_type.cgi" ) %>
% }
<%init>
my $error = '';
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my %vars = $cgi->Vars;
warn Dumper(\%vars)."\n";
my %old = map { $_->cdrtypenum => $_ } qsearch('cdr_type', {});
my @new;
foreach ( keys(%vars) ) {
my ($i) = /^cdrtypenum(\d+)$/ or next;
my $cdrtypenum = $vars{"cdrtypenum$i"} or next;
my $cdrtypename = $vars{"cdrtypename$i"} or next;
# don't delete unchanged records
if ( $old{$i} and $old{$i}->cdrtypename eq $cdrtypename ) {
delete $old{$i};
next;
}
push @new, FS::cdr_type->new({
'cdrtypenum' => $cdrtypenum,
'cdrtypename' => $cdrtypename,
});
}
foreach (values(%old)) {
$error = $_->delete;
last if $error;
}
if(!$error) {
foreach (@new) {
$error = $_->insert;
last if $error;
}
}
</%init>
- Previous message: [freeside-commits] freeside/httemplate/edit cdr_type.cgi, NONE, 1.1 rate.cgi, 1.17, 1.18 rate_detail.html, 1.6, 1.7 rate_region.cgi, 1.14, 1.15
- Next message: [freeside-commits] freeside/httemplate/elements select-cdr_type.html, NONE, 1.1 auto-table.html, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list