[freeside-commits] freeside/httemplate/edit/process part_pkg.cgi, 1.35, 1.36
Jeff Finucane,420,,
jeff at wavetail.420.am
Thu Aug 28 00:38:43 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv24869/httemplate/edit/process
Modified Files:
part_pkg.cgi
Log Message:
multiple usage classes checkpoint
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/part_pkg.cgi,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- part_pkg.cgi 9 Jul 2008 02:30:45 -0000 1.35
+++ part_pkg.cgi 28 Aug 2008 07:38:40 -0000 1.36
@@ -84,6 +84,13 @@
}
@options;
+ foreach ( split(',', $cgi->param('taxproductnums') ) ) {
+ my $value = $cgi->param("taxproductnum_$_");
+ $error ||= "Illegal taxproductnum_$_: $value"
+ unless ( $value =~ /^\d*$/ );
+ $options{"usage_taxproductnum_$_"} = $value;
+ }
+
$options{$_} = scalar( $cgi->param($_) )
for (qw( setup_fee recur_fee ));
@@ -146,6 +153,22 @@
},
);
+foreach my $override_class ($cgi->param) {
+ next unless $override_class =~ /^tax_override_(\w+)$/;
+ my $class = $1;
+
+ my (@tax_overrides) = (grep "$_", split (",", $1))
+ if $cgi->param($override_class) =~ /^([\d,]+)$/;
+
+ push @process_m2m, {
+ 'link_table' => 'part_pkg_taxoverride',
+ 'target_table' => 'tax_class',
+ 'hashref' => { 'usage_class' => $class },
+ 'params' => \@tax_overrides,
+ };
+
+}
+
my $conf = new FS::Conf;
if ( $cgi->param('pkgpart') || ! $conf->exists('agent_defaultpkg') ) {
More information about the freeside-commits
mailing list